C# Class WebStreams.Server.WebSocket

The web socket context.
Inheritance: IDisposable
Show file Open project: WebStreams/WebStreams.Server

Public Methods

Method Description
Close ( int closeStatus, string closeDescription ) : Task

Close the connection with the client.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

ReceiveString ( ) : Task

Receives and returns a string to the client.

Send ( ArraySegment data, int messageType, bool endOfMessage ) : Task

Send the provided data to the client.

Send ( string message ) : Task

Send the provided message to the client.

WebSocket ( object>.IDictionary context ) : System

Initializes a new instance of the WebSocket class.

Private Methods

Method Description
ThrowIfDisposed ( ) : void

Throws ObjectDisposedException if this instance has been disposed.

Method Details

Close() public method

Close the connection with the client.
public Close ( int closeStatus, string closeDescription ) : Task
closeStatus int /// The close status. ///
closeDescription string /// The close description. ///
return Task

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

ReceiveString() public method

Receives and returns a string to the client.
public ReceiveString ( ) : Task
return Task

Send() public method

Send the provided data to the client.
public Send ( ArraySegment data, int messageType, bool endOfMessage ) : Task
data ArraySegment /// The data. ///
messageType int /// The message type. ///
endOfMessage bool /// A value indicating whether this is the end of the message. ///
return Task

Send() public method

Send the provided message to the client.
public Send ( string message ) : Task
message string /// The message. ///
return Task

WebSocket() public method

Initializes a new instance of the WebSocket class.
public WebSocket ( object>.IDictionary context ) : System
context object>.IDictionary /// The context. ///
return System