WebSocketSessionManagerSendToAsync Method (Stream, Int32, String, ActionBoolean) |
Namespace: Sfs2X.WebSocketSharp.Server
public void SendToAsync( Stream stream, int length, string id, Action<bool> completed )
An Action<bool> delegate or if not needed.
The delegate invokes the method called when the send is complete.
true is passed to the method if the send has done with no error; otherwise, false.
Exception | Condition |
---|---|
ArgumentNullException | id is . -or- stream is . |
ArgumentException | id is an empty string. -or- stream cannot be read. -or- length is less than 1. -or- No data could be read from stream. |
InvalidOperationException | The session could not be found. -or- The current state of the WebSocket connection is not Open. |
The data is sent as the binary data.
This method does not wait for the send to be complete.