connectTcp method

  1. @override
Future<bool> connectTcp(
  1. String host,
  2. int port, {
  3. int timeout = 20000,
})
override

Connect via TCP (WiFi).

Implementation

@override
Future<bool> connectTcp(String host, int port, {int timeout = 20000}) async {
  final result = await methodChannel.invokeMethod<bool>('connectTcp', {
    'host': host,
    'port': port,
    'timeout': timeout,
  });
  return result ?? false;
}