C# Class ALE.Tcp.WebSocket

Show file Open project: blesh/ALE Class Usage Examples

Public Properties

Property Type Description
ClientHandshake string
Encoding System.Text.Encoding
Server WebSocketServer

Public Methods

Method Description
ProcessIncoming ( byte buffer, int bytesRead ) : void
Receive ( Action callback ) : void
Send ( string text, Action callback = null ) : void
SendUnencoded ( string text, Action callback = null ) : void
WebSocket ( WebSocketServer server, TcpClient tcp ) : System

Private Methods

Method Description
BeginRead ( ) : void
DecodeClientData ( byte bytes ) : string
EncodeServerData ( string text ) : byte[]
ProcessRead ( int bytesRead, ReadState state ) : void
ReadCallback ( IAsyncResult result ) : void
SendCallback ( IAsyncResult result ) : void
SendHandshake ( byte buffer, int bytesRead ) : void

Method Details

ProcessIncoming() public method

public ProcessIncoming ( byte buffer, int bytesRead ) : void
buffer byte
bytesRead int
return void

Receive() public method

public Receive ( Action callback ) : void
callback Action
return void

Send() public method

public Send ( string text, Action callback = null ) : void
text string
callback Action
return void

SendUnencoded() public method

public SendUnencoded ( string text, Action callback = null ) : void
text string
callback Action
return void

WebSocket() public method

public WebSocket ( WebSocketServer server, TcpClient tcp ) : System
server WebSocketServer
tcp System.Net.Sockets.TcpClient
return System

Property Details

ClientHandshake public property

public string ClientHandshake
return string

Encoding public property

public Encoding,System.Text Encoding
return System.Text.Encoding

Server public property

public WebSocketServer,ALE.Tcp Server
return WebSocketServer