|
|
|
@ -2670,14 +2670,14 @@ namespace WebSocketSharp
|
|
|
|
/// </exception>
|
|
|
|
/// </exception>
|
|
|
|
public void Send (byte[] data)
|
|
|
|
public void Send (byte[] data)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (data == null)
|
|
|
|
|
|
|
|
throw new ArgumentNullException ("data");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_readyState != WebSocketState.Open) {
|
|
|
|
if (_readyState != WebSocketState.Open) {
|
|
|
|
var msg = "The current state of the connection is not Open.";
|
|
|
|
var msg = "The current state of the connection is not Open.";
|
|
|
|
throw new InvalidOperationException (msg);
|
|
|
|
throw new InvalidOperationException (msg);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (data == null)
|
|
|
|
|
|
|
|
throw new ArgumentNullException ("data");
|
|
|
|
|
|
|
|
|
|
|
|
send (Opcode.Binary, new MemoryStream (data));
|
|
|
|
send (Opcode.Binary, new MemoryStream (data));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|