AngelWebSocket constructor

AngelWebSocket(
  1. Angel app, {
  2. bool sendErrors = false,
  3. bool allowClientParams = false,
  4. bool allowAuth = true,
  5. StreamChannel<WebSocketEvent>? synchronizationChannel,
  6. WebSocketResponseSerializer? serializer,
  7. Function? deserializer,
  8. List<String> allowedOrigins = const [],
  9. List<String> allowedProtocols = const [],
})

Implementation

AngelWebSocket(
  this.app, {
  this.sendErrors = false,
  this.allowClientParams = false,
  this.allowAuth = true,
  this.synchronizationChannel,
  this.serializer,
  this.deserializer,
  this.allowedOrigins = const [],
  this.allowedProtocols = const [],
}) {
  serializer ??= json.encode;
  deserializer ??= (params) => params;
}