src/packages/EmbedIO/WebSockets/Internal/WebSocket.cs
/// <summary>
/// Asynchronously sends a ping with the specified <paramref name="message"/> on the WebSocket connection.
/// </summary>
/// <param name="message">A <see cref="string"/> that represents the message to send.</param>
/// <returns>A <see cref="Task{TResult}"/> whose result will be <c>true</c> if the <see cref="WebSocket"/>
/// receives a pong to this ping in a time; otherwise, the  task's result will be <c>false</c>.</returns>
Asynchronously sends a ping with the specified  on the WebSocket connection.
Asynchronously sends a ping with the specified on the WebSocket connection .
public Task<bool> PingAsync(string message)
        {
            if (string.IsNullOrEmpty(message))
                return PingAsync();
            var data = Encoding.UTF8.GetBytes(message);
            if (data.Length <= 125)
                return PingAsync(WebSocketFrame.CreatePingFrame(data).ToArray(), _waitTime);
            "A message has greater than the allowable max size.".Error(nameof(PingAsync));
            return Task.FromResult(false);
        }
public Task < bool > PingAsync ( string message ) { if ( string . IsNullOrEmpty ( message ) ) return PingAsync ( ) ; var data = Encoding . UTF8 . GetBytes ( message ) ; if ( data . Length <= 125 ) return PingAsync ( WebSocketFrame . CreatePingFrame ( data ) . ToArray ( ) , _waitTime ) ; " " . Error ( nameof ( PingAsync ) ) ; return Task . FromResult ( false ) ; }
Asynchronously sends a ping with the specified  on the WebSocket connection.
Asynchronously sends a ping with the specified on the WebSocket connection .
A  whose result will be true
receives a pong to this ping in a time; otherwise, the  task's result will be false
A whose result will be true receives a pong to this ping in a time ; otherwise the task ' s result will be false
message
string
A  that represents the message to send.
A that represents the message to send .