C# Class WebSocket4Net.WebSocket

Inheritance: IDisposable
Show file Open project: kerryjiang/WebSocket4Net Class Usage Examples

Private Properties

Property Type Description
CheckCloseHandshake void
ClearTimer void
CloseWithoutHandshake void
CreateClient SuperSocket.ClientEngine.TcpClientSession
CreateSecureClient SuperSocket.ClientEngine.TcpClientSession
CreateSecureTcpSession SuperSocket.ClientEngine.TcpClientSession
EnsureWebSocketOpen bool
FireClosed void
FireDataReceived void
FireError void
FireMessageReceived void
GetAvailableProcessor bool
GetProtocolProcessor IProtocolProcessor
Initialize void
OnClosed void
OnDataReceived void
OnError void
OnError void
OnPingTimerCallback void
ResolveUri System.Net.EndPoint
WebSocket System

Public Methods

Method Description
Close ( ) : void
Close ( int statusCode, string reason ) : void
Close ( string reason ) : void
Dispose ( ) : void
OnConnected ( ) : void
Open ( ) : void
Send ( IList segments ) : void
Send ( byte data, int offset, int length ) : void
Send ( string message ) : void
WebSocket ( string uri, string subProtocol = "", string>.List cookies = null, string>.List customHeaderItems = null, string userAgent = "", string origin = "", WebSocketVersion version = WebSocketVersion.None, EndPoint httpConnectProxy = null, int receiveBufferSize ) : System
WebSocket ( string uri, string subProtocol, string cookies, string>.List customHeaderItems = null, string userAgent = "", string origin = "", WebSocketVersion version = WebSocketVersion.None, EndPoint httpConnectProxy = null, int receiveBufferSize ) : System
client_Closed ( object sender, EventArgs e ) : void
client_Connected ( object sender, EventArgs e ) : void
client_DataReceived ( object sender, DataEventArgs e ) : void
client_Error ( object sender, ErrorEventArgs e ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void
ExecuteCommand ( WebSocketCommandInfo commandInfo ) : void
OnHandshaked ( ) : void

Private Methods

Method Description
CheckCloseHandshake ( object state ) : void
ClearTimer ( ) : void
CloseWithoutHandshake ( ) : void
CreateClient ( string uri ) : TcpClientSession
CreateSecureClient ( string uri ) : TcpClientSession
CreateSecureTcpSession ( ) : TcpClientSession
EnsureWebSocketOpen ( ) : bool
FireClosed ( ) : void
FireDataReceived ( byte data ) : void
FireError ( Exception error ) : void
FireMessageReceived ( string message ) : void
GetAvailableProcessor ( int availableVersions ) : bool
GetProtocolProcessor ( WebSocketVersion version ) : IProtocolProcessor
Initialize ( string uri, string subProtocol, string>.List cookies, string>.List customHeaderItems, string userAgent, string origin, WebSocketVersion version, EndPoint httpConnectProxy, int receiveBufferSize ) : void
OnClosed ( ) : void
OnDataReceived ( byte data, int offset, int length ) : void
OnError ( SuperSocket.ClientEngine.ErrorEventArgs e ) : void
OnError ( Exception e ) : void
OnPingTimerCallback ( object state ) : void
ResolveUri ( string uri, int defaultPort, int &port ) : EndPoint
WebSocket ( ) : System

Method Details

Close() public method

public Close ( ) : void
return void

Close() public method

public Close ( int statusCode, string reason ) : void
statusCode int
reason string
return void

Close() public method

public Close ( string reason ) : void
reason string
return void

Dispose() public method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

ExecuteCommand() protected method

protected ExecuteCommand ( WebSocketCommandInfo commandInfo ) : void
commandInfo WebSocketCommandInfo
return void

OnConnected() public method

public OnConnected ( ) : void
return void

OnHandshaked() protected method

protected OnHandshaked ( ) : void
return void

Open() public method

public Open ( ) : void
return void

Send() public method

public Send ( IList segments ) : void
segments IList
return void

Send() public method

public Send ( byte data, int offset, int length ) : void
data byte
offset int
length int
return void

Send() public method

public Send ( string message ) : void
message string
return void

WebSocket() public method

public WebSocket ( string uri, string subProtocol = "", string>.List cookies = null, string>.List customHeaderItems = null, string userAgent = "", string origin = "", WebSocketVersion version = WebSocketVersion.None, EndPoint httpConnectProxy = null, int receiveBufferSize ) : System
uri string
subProtocol string
cookies string>.List
customHeaderItems string>.List
userAgent string
origin string
version WebSocketVersion
httpConnectProxy System.Net.EndPoint
receiveBufferSize int
return System

WebSocket() public method

public WebSocket ( string uri, string subProtocol, string cookies, string>.List customHeaderItems = null, string userAgent = "", string origin = "", WebSocketVersion version = WebSocketVersion.None, EndPoint httpConnectProxy = null, int receiveBufferSize ) : System
uri string
subProtocol string
cookies string
customHeaderItems string>.List
userAgent string
origin string
version WebSocketVersion
httpConnectProxy EndPoint
receiveBufferSize int
return System

client_Closed() public method

public client_Closed ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

client_Connected() public method

public client_Connected ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void

client_DataReceived() public method

public client_DataReceived ( object sender, DataEventArgs e ) : void
sender object
e DataEventArgs
return void

client_Error() public method

public client_Error ( object sender, ErrorEventArgs e ) : void
sender object
e ErrorEventArgs
return void