[Modify] Edit it
This commit is contained in:
parent
a01c2354e1
commit
440c3ce20d
@ -672,28 +672,59 @@ namespace WebSocketSharp.Server
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends binary data from the specified <see cref="Stream"/> asynchronously to
|
/// Sends the data from the specified stream to a client asynchronously
|
||||||
/// the client on a session.
|
/// using the WebSocket connection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// <para>
|
/// This method does not wait for the send to be complete.
|
||||||
/// 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>
|
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="stream">
|
/// <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>
|
||||||
/// <param name="length">
|
/// <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>
|
||||||
/// <param name="completed">
|
/// <param name="completed">
|
||||||
/// An <c>Action<bool></c> delegate that references the method(s) called when
|
/// <para>
|
||||||
/// the send is complete. A <see cref="bool"/> passed to this delegate is <c>true</c>
|
/// An <c>Action<bool></c> delegate or <see langword="null"/>
|
||||||
/// if the send is complete successfully.
|
/// 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>
|
/// </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)
|
protected void SendAsync (Stream stream, int length, Action<bool> completed)
|
||||||
{
|
{
|
||||||
if (_websocket == null) {
|
if (_websocket == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user