WebSocketSendAsync Method (Stream, Int32, ActionBoolean) |
Namespace: Sfs2X.WebSocketSharp
public void SendAsync( Stream stream, int length, Action<bool> completed )
A Stream instance from which to read the data to send.
The data is sent as the binary data.
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 |
---|---|
InvalidOperationException | The current state of the connection is not Open. |
ArgumentNullException | stream is . |
ArgumentException | stream cannot be read. -or- length is less than 1. -or- No data could be read from stream. |