[Modify] Polish it
This commit is contained in:
parent
a03257ca4a
commit
63c3d134c9
@ -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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user