Метод | Описание | |
---|---|---|
Assign ( Socket socket ) : void |
Assign a socket to this channel the channel will start receive new messages as soon as you've called assign. You must have specified a MessageReceived delegate first. |
|
Cleanup ( ) : void |
Cleanup everything so that the channel can be reused.
|
|
Close ( ) : void |
Signal channel to close. Will wait for all data to be sent before closing. |
|
CloseAsync ( ) : Task |
Signal channel to close. Will wait for all data to be sent before closing. |
|
Send ( object message ) : void |
Send a new message Outbound messages are enqueued and sent in order. You may enqueue |
|
TcpChannel ( IBufferSlice readBuffer, IMessageEncoder encoder, IMessageDecoder decoder ) : System |
Initializes a new instance of the TcpChannel class.
|
Метод | Описание | |
---|---|---|
CreateException ( SocketError socketError ) : |
||
HandleRemoteDisconnect ( SocketError socketError, |
Detected a disconnect
|
|
OnChannelFailure ( |
Detected a disconnect
|
|
OnMessageReceived ( object obj ) : void | ||
OnReadCompleted ( object sender, |
||
OnSendCompleted ( object sender, |
||
ReadAsync ( ) : void |
public Assign ( Socket socket ) : void | ||
socket | Socket | Connected socket |
Результат | void |
public Send ( object message ) : void | ||
message | object | Message to send |
Результат | void |
public TcpChannel ( IBufferSlice readBuffer, IMessageEncoder encoder, IMessageDecoder decoder ) : System | ||
readBuffer | IBufferSlice | Buffer used for our reading. |
encoder | IMessageEncoder | Used to encode messages before they are put in the MicroMessage body of outbound messages. |
decoder | IMessageDecoder |
/// Used to decode the body of incoming MicroMessages. The |
Результат | System |