C# Class m.Http.Backend.Tcp.WebSocketSession

Inheritance: TcpSessionBase, IWebSocketSession
Mostra file Open project: joongonn/mHttp Class Usage Examples

Public Methods

Method Description
CloseSession ( ushort statusCode, string reason = null ) : void
Dispose ( ) : void
ReadNextMessageAsync ( ) : Task
SendBinary ( byte blob ) : void
SendClose ( ushort statusCode, string reason = null ) : void
SendPing ( ) : void
SendPong ( ) : void
SendText ( string text ) : void
WebSocketSession ( long id, TcpClient tcpClient, Stream stream, Action onBytesReceived, Action onBytesSent, System.Action onDisposed, int initialReadBufferSize, int readTimeoutMs, int writeTimeoutMs ) : System

Private Methods

Method Description
TryDecodeNextMessage ( OpCode &opCode, byte &messagePayload ) : bool
Write ( OpCode opCode, byte payload = null ) : void

Method Details

CloseSession() public method

public CloseSession ( ushort statusCode, string reason = null ) : void
statusCode ushort
reason string
return void

Dispose() public method

public Dispose ( ) : void
return void

ReadNextMessageAsync() public method

public ReadNextMessageAsync ( ) : Task
return Task

SendBinary() public method

public SendBinary ( byte blob ) : void
blob byte
return void

SendClose() public method

public SendClose ( ushort statusCode, string reason = null ) : void
statusCode ushort
reason string
return void

SendPing() public method

public SendPing ( ) : void
return void

SendPong() public method

public SendPong ( ) : void
return void

SendText() public method

public SendText ( string text ) : void
text string
return void

WebSocketSession() public method

public WebSocketSession ( long id, TcpClient tcpClient, Stream stream, Action onBytesReceived, Action onBytesSent, System.Action onDisposed, int initialReadBufferSize, int readTimeoutMs, int writeTimeoutMs ) : System
id long
tcpClient System.Net.Sockets.TcpClient
stream Stream
onBytesReceived Action
onBytesSent Action
onDisposed System.Action
initialReadBufferSize int
readTimeoutMs int
writeTimeoutMs int
return System