C# Class ALE.Tcp.WebSocket

Datei anzeigen 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_oe property

public string ClientHandshake
return string

Encoding public_oe property

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

Server public_oe property

public WebSocketServer,ALE.Tcp Server
return WebSocketServer