Class Connection#
Defined in File Connection.cs
Inheritance Relationships#
Base Type#
public xbe.sdk.Network.IConnection
(exhale_interface_interfacexbe_1_1sdk_1_1Network_1_1IConnection)
Class Documentation#
- class xbe.sdk.Network.Connection : xbe.sdk.Network.IConnection#
Public Functions
- Connection ()#
- void AddSocketMessageListener (OnSocketMessage callback)#
- void RemoveSocketMessageListener (OnSocketMessage callback)#
- void AddUnknownMessageListener (OnUnknownMessage callback)#
- void RemoveUnknownMessageListener (OnUnknownMessage callback)#
- async Task Connect (Uri url)#
Initiates a network connection to the given url.
- Param url:
- Return:
- async Task Disconnect ()#
Disconnects all active client connections.
- Return:
- void AddSocket (ClientWebSocket socket, SocketMode mode)#
Adds the given socket to the connection for monitoring and processing.
- Param socket:
- Param mode:
- Task Send (MessageType type, byte[] data)#
Transmits the given data buffer to the outgoing connection.
- Param type:
The type of message being transmitted.
- Param data:
The data buffer to transmit.
- Return:
Properties
- ConnectionState State { get; set; }#
The current state of the connection.
Public Static Attributes
- const string NORMAL_STATUS = "normal"#
Protected Functions
- async void Update ()#