C# Class Websockets.Net.WebSocketWrapper

Inheritance: IDisposable
Mostra file Open project: NVentimiglia/Websockets.PCL Class Usage Examples

Public Methods

Method Description
Connect ( string uri, string protocol = null, string authToken = null ) : Task

Connects to the WebSocket server.

Create ( ) : WebSocketWrapper

Creates a new instance.

Disconnect ( ) : Task
Dispose ( ) : void
SendMessage ( string message ) : Task

Send a message to the WebSocket server.

WebSocketWrapper ( ) : System

Private Methods

Method Description
CallOnConnected ( ) : void
CallOnDisconnected ( ) : void
CallOnError ( Exception ex ) : void
CallOnMessage ( StringBuilder stringResult ) : void
RunInTask ( System.Action action ) : void
StartListen ( ) : void

Method Details

Connect() public method

Connects to the WebSocket server.
public Connect ( string uri, string protocol = null, string authToken = null ) : Task
uri string
protocol string
authToken string
return Task

Create() public static method

Creates a new instance.
public static Create ( ) : WebSocketWrapper
return WebSocketWrapper

Disconnect() public method

public Disconnect ( ) : Task
return Task

Dispose() public method

public Dispose ( ) : void
return void

SendMessage() public method

Send a message to the WebSocket server.
public SendMessage ( string message ) : Task
message string The message to send
return Task

WebSocketWrapper() public method

public WebSocketWrapper ( ) : System
return System