WebSocketService constructor

WebSocketService(
  1. Uri uri, {
  2. void onReceive(
    1. WebSocketEventMessage
    )?,
  3. void onDone()?,
  4. void onError(
    1. dynamic
    )?,
  5. void onConnecting()?,
  6. void onConnected()?,
  7. void onConnectionFail(
    1. dynamic
    )?,
  8. Duration reconnectIn = const Duration(seconds: 10),
  9. Map<String, dynamic>? headers,
})

Implementation

WebSocketService(
  this.uri, {
  this.onReceive,
  this.onDone,
  this.onError,
  this.onConnecting,
  this.onConnected,
  this.onConnectionFail,
  this.reconnectIn = const Duration(seconds: 10),
  this.headers,
});