WebSocketInterceptor class abstract

Interceptor that can inspect and transform messages before sending or after receiving.

Return null from any method to suppress the message entirely.

Implementers

Constructors

WebSocketInterceptor()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onError(dynamic error) Future
Called when a connection error occurs. Return null to suppress the error.
onReceive(WebSocketMessage message) Future<WebSocketMessage?>
Called after a message is received. Return null to drop the message.
onSend(WebSocketMessage message) Future<WebSocketMessage?>
Called before a message is sent. Return null to drop the message.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited