initVncClient method
Implementation
@override
Future<int?> initVncClient(
String hostName,
int port,
String password, {
Duration? connectTimeout,
}) async {
final int? timeoutSeconds;
if (connectTimeout == null) {
timeoutSeconds = null;
} else {
timeoutSeconds =
((connectTimeout.inMilliseconds + 999) ~/ 1000).clamp(1, 1 << 30);
}
final datas = await methodChannel.invokeMethod<int>('initVncClient', {
"hostName": hostName,
"port": port,
"password": password,
if (timeoutSeconds != null) "connectTimeoutSeconds": timeoutSeconds,
});
return datas;
}