[Modify] Remove it
This commit is contained in:
parent
9e7c43cb8b
commit
af895d5f33
@ -554,44 +554,6 @@ namespace WebSocketSharp.Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sends <paramref name="data"/> to every client in the WebSocket services.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="data">
|
|
||||||
/// A <see cref="string"/> that represents the text data to send.
|
|
||||||
/// </param>
|
|
||||||
/// <exception cref="InvalidOperationException">
|
|
||||||
/// The current state of the manager is not Start.
|
|
||||||
/// </exception>
|
|
||||||
/// <exception cref="ArgumentNullException">
|
|
||||||
/// <paramref name="data"/> is <see langword="null"/>.
|
|
||||||
/// </exception>
|
|
||||||
/// <exception cref="ArgumentException">
|
|
||||||
/// <paramref name="data"/> could not be UTF-8-encoded.
|
|
||||||
/// </exception>
|
|
||||||
[Obsolete ("This method will be removed.")]
|
|
||||||
public void Broadcast (string data)
|
|
||||||
{
|
|
||||||
if (_state != ServerState.Start) {
|
|
||||||
var msg = "The current state of the manager is not Start.";
|
|
||||||
throw new InvalidOperationException (msg);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data == null)
|
|
||||||
throw new ArgumentNullException ("data");
|
|
||||||
|
|
||||||
byte[] bytes;
|
|
||||||
if (!data.TryGetUTF8EncodedBytes (out bytes)) {
|
|
||||||
var msg = "It could not be UTF-8-encoded.";
|
|
||||||
throw new ArgumentException (msg, "data");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bytes.LongLength <= WebSocket.FragmentLength)
|
|
||||||
broadcast (Opcode.Text, bytes, null);
|
|
||||||
else
|
|
||||||
broadcast (Opcode.Text, new MemoryStream (bytes), null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sends <paramref name="data"/> asynchronously to every client in
|
/// Sends <paramref name="data"/> asynchronously to every client in
|
||||||
/// the WebSocket services.
|
/// the WebSocket services.
|
||||||
|
Loading…
Reference in New Issue
Block a user