|
|
|
@ -1019,22 +1019,17 @@ namespace WebSocketSharp.Server
|
|
|
|
/// <paramref name="id"/> is <see langword="null"/>.
|
|
|
|
/// <paramref name="id"/> is <see langword="null"/>.
|
|
|
|
/// </exception>
|
|
|
|
/// </exception>
|
|
|
|
/// <exception cref="ArgumentException">
|
|
|
|
/// <exception cref="ArgumentException">
|
|
|
|
/// <para>
|
|
|
|
|
|
|
|
/// <paramref name="id"/> is an empty string.
|
|
|
|
/// <paramref name="id"/> is an empty string.
|
|
|
|
/// </para>
|
|
|
|
/// </exception>
|
|
|
|
/// <para>
|
|
|
|
/// <exception cref="InvalidOperationException">
|
|
|
|
/// -or-
|
|
|
|
|
|
|
|
/// </para>
|
|
|
|
|
|
|
|
/// <para>
|
|
|
|
|
|
|
|
/// The session could not be found.
|
|
|
|
/// The session could not be found.
|
|
|
|
/// </para>
|
|
|
|
|
|
|
|
/// </exception>
|
|
|
|
/// </exception>
|
|
|
|
public bool PingTo (string id)
|
|
|
|
public bool PingTo (string id)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
IWebSocketSession session;
|
|
|
|
IWebSocketSession session;
|
|
|
|
if (!TryGetSession (id, out session)) {
|
|
|
|
if (!TryGetSession (id, out session)) {
|
|
|
|
var msg = "The session could not be found.";
|
|
|
|
var msg = "The session could not be found.";
|
|
|
|
throw new ArgumentException (msg, "id");
|
|
|
|
throw new InvalidOperationException (msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return session.Context.WebSocket.Ping ();
|
|
|
|
return session.Context.WebSocket.Ping ();
|
|
|
|
|