[Modify] Polish it

master
sta 9 years ago
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…
Cancel
Save