connect static method
Future<BufferedSocket>
connect(
- String? host,
- int? port, {
- DataReadyHandler? onDataReady,
- DoneHandler? onDone,
- ErrorHandler? onError,
- ClosedHandler? onClosed,
- SocketFactory socketFactory = defaultSocketFactory,
Implementation
static Future<BufferedSocket> connect(
String? host,
int? port, {
DataReadyHandler? onDataReady,
DoneHandler? onDone,
ErrorHandler? onError,
ClosedHandler? onClosed,
SocketFactory socketFactory = defaultSocketFactory,
}) async {
var socket;
socket = await socketFactory(host, port);
socket.setOption(SocketOption.tcpNoDelay, true);
return BufferedSocket._(socket, onDataReady, onDone, onError, onClosed);
}