BaseWebSocket constructor

BaseWebSocket(
  1. String url, {
  2. Duration ping = const Duration(seconds: 5),
  3. bool allowSelfSigned = true,
})

Implementation

BaseWebSocket(
  this.url, {
  this.ping = const Duration(seconds: 5),
  this.allowSelfSigned = true,
}) {
  url = url.startsWith('https')
      ? url.replaceAll('https:', 'wss:')
      : url.replaceAll('http:', 'ws:');
}