WebSocketSupportPlatform class abstract

The interface that implementations of web_socket_support must implement.

Platform implementations should extend this class rather than implement it as web_socket_support does not consider newly added methods to be breaking changes. Extending this class (using extends) ensures that the subclass will get the default implementation, while platform implementations that implements this interface will be broken by newly added WebSocketSupportPlatform methods.

Inheritance
  • Object
  • PlatformInterface
  • WebSocketSupportPlatform
Implementers

Constructors

WebSocketSupportPlatform()
Constructs a WebSocketSupportPlatform.

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

connect(String serverUrl, {WebSocketOptions options = const WebSocketOptions()}) Future<bool?>
Initialize ws connection to specified server url. If connection was successful, onWsOpened will be invoked.
disconnect({int code = 1000, String reason = 'Client done.'}) Future<bool?>
Initialize ws connection close by client. When connection is successfully closed, onWsClosed will be invoked.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance WebSocketSupportPlatform
The default instance of WebSocketSupportPlatform to use.
getter/setter pair