TcpSocketClient constructor
TcpSocketClient({
- required dynamic host,
- required int port,
- dynamic sourceAddress,
- int sourcePort = 0,
- Duration? timeout,
- Map? connectData,
- EventEmitter? eventEmitter,
- Duration? pingInterval,
- String event_socket_invoke = "socket_invoke",
- String event_socket_connection = "socket_connection",
- String event_socket_update = "socket_update",
Implementation
TcpSocketClient({
required this.host,
required this.port,
this.sourceAddress,
this.sourcePort = 0,
this.timeout,
Map? connectData,
EventEmitter? eventEmitter,
Duration? pingInterval,
this.event_socket_invoke = "socket_invoke",
this.event_socket_connection = "socket_connection",
this.event_socket_update = "socket_update",
}) {
pingInterval ??= Duration(seconds: 1);
ping_interval = pingInterval;
if (connectData != null) {
connect_data.addAll(connect_data);
}
if (eventEmitter != null) {
emitter = eventEmitter;
}
}