MethodChannelWebSocketSupport class
- Inheritance
-
- Object
- PlatformInterface
- WebSocketSupportPlatform
- MethodChannelWebSocketSupport
Constructors
- MethodChannelWebSocketSupport(WebSocketListener _listener)
- MethodChannelWebSocketSupport.private(WebSocketListener _listener, MethodChannel _methodChannel, EventChannel _textMessagesChannel, EventChannel _byteMessagesChannel)
- This constructor is only used for testing and shouldn't be accessed by users of the plugin. It may break or change at any time.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- listener → WebSocketListener
-
obtain WebSocketListener implementation
no setter
- 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.override -
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.override -
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
Constants
- byteEventChannelName → const String
- methodChannelExceptionCode → const String
- methodChannelName → const String
- textEventChannelName → const String
- unexpectedMethodNameMessage → const String