[Modify] Polish it

This commit is contained in:
sta 2016-11-17 16:57:16 +09:00
parent a03257ca4a
commit 63c3d134c9

View File

@ -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));
} }