[Modify] Remove it
This commit is contained in:
parent
f4241368a8
commit
9b8ce2b913
@ -554,63 +554,6 @@ namespace WebSocketSharp.Server
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a ping with <paramref name="message"/> to every client in
|
||||
/// the WebSocket services.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// <para>
|
||||
/// A <c>Dictionary<string, Dictionary<string, bool>></c>.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// It represents a collection of pairs of a service path and another
|
||||
/// collection of pairs of a session ID and a value indicating whether
|
||||
/// a pong has been received from the client within a time.
|
||||
/// </para>
|
||||
/// </returns>
|
||||
/// <param name="message">
|
||||
/// <para>
|
||||
/// A <see cref="string"/> that represents the message to send.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// The size must be 125 bytes or less in UTF-8.
|
||||
/// </para>
|
||||
/// </param>
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// The current state of the manager is not Start.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentException">
|
||||
/// <paramref name="message"/> could not be UTF-8-encoded.
|
||||
/// </exception>
|
||||
/// <exception cref="ArgumentOutOfRangeException">
|
||||
/// The size of <paramref name="message"/> is greater than 125 bytes.
|
||||
/// </exception>
|
||||
[Obsolete ("This method will be removed.")]
|
||||
public Dictionary<string, Dictionary<string, bool>> Broadping (string message)
|
||||
{
|
||||
if (_state != ServerState.Start) {
|
||||
var msg = "The current state of the manager is not Start.";
|
||||
throw new InvalidOperationException (msg);
|
||||
}
|
||||
|
||||
if (message.IsNullOrEmpty ())
|
||||
return broadping (WebSocketFrame.EmptyPingBytes, _waitTime);
|
||||
|
||||
byte[] bytes;
|
||||
if (!message.TryGetUTF8EncodedBytes (out bytes)) {
|
||||
var msg = "It could not be UTF-8-encoded.";
|
||||
throw new ArgumentException (msg, "message");
|
||||
}
|
||||
|
||||
if (bytes.Length > 125) {
|
||||
var msg = "Its size is greater than 125 bytes.";
|
||||
throw new ArgumentOutOfRangeException ("message", msg);
|
||||
}
|
||||
|
||||
var frame = WebSocketFrame.CreatePingFrame (bytes, false);
|
||||
return broadping (frame.ToArray (), _waitTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes all WebSocket services managed by the manager.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user