[Modify] Edit it
This commit is contained in:
parent
a01c2354e1
commit
440c3ce20d
@ -672,28 +672,59 @@ namespace WebSocketSharp.Server
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends binary data from the specified <see cref="Stream"/> asynchronously to
|
||||
/// the client on a session.
|
||||
/// Sends the data from the specified stream to a client asynchronously
|
||||
/// using the WebSocket connection.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// This method is available after the WebSocket connection has been established.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// This method doesn't wait for the send to be complete.
|
||||
/// </para>
|
||||
/// This method does not wait for the send to be complete.
|
||||
/// </remarks>
|
||||
/// <param name="stream">
|
||||
/// A <see cref="Stream"/> from which contains the binary data to send.
|
||||
/// <para>
|
||||
/// A <see cref="Stream"/> instance from which to read the data to send.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The data is sent as the binary data.
|
||||
/// </para>
|
||||
/// </param>
|
||||
/// <param name="length">
|
||||
/// An <see cref="int"/> that represents the number of bytes to send.
|
||||
/// An <see cref="int"/> that specifies the number of bytes to send.
|
||||
/// </param>
|
||||
/// <param name="completed">
|
||||
/// An <c>Action<bool></c> delegate that references the method(s) called when
|
||||
/// the send is complete. A <see cref="bool"/> passed to this delegate is <c>true</c>
|
||||
/// if the send is complete successfully.
|
||||
/// <para>
|
||||
/// An <c>Action<bool></c> delegate or <see langword="null"/>
|
||||
/// if not needed.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The delegate invokes the method called when the send is complete.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <c>true</c> is passed to the method if the send has done with
|
||||
/// no error; otherwise, <c>false</c>.
|
||||
/// </para>
|
||||
/// </param>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// The current state of the connection is not Open.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// <paramref name="stream"/> is <see langword="null"/>.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// <para>
|
||||
/// <paramref name="stream"/> cannot be read.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// -or-
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <paramref name="length"/> is less than 1.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// -or-
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// No data could be read from <paramref name="stream"/>.
|
||||
/// </para>
|
||||
/// </exception>
|
||||
protected void SendAsync (Stream stream, int length, Action<bool> completed)
|
||||
{
|
||||
if (_websocket == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user