[Modify] Polish it
This commit is contained in:
parent
e17e9adf2f
commit
2ef6af69fe
@ -593,8 +593,10 @@ namespace WebSocketSharp.Server
|
|||||||
throw new ArgumentNullException ("data");
|
throw new ArgumentNullException ("data");
|
||||||
|
|
||||||
byte[] bytes;
|
byte[] bytes;
|
||||||
if (!data.TryGetUTF8EncodedBytes (out bytes))
|
if (!data.TryGetUTF8EncodedBytes (out bytes)) {
|
||||||
throw new ArgumentException ("It could not be UTF-8-encoded.", "data");
|
var msg = "It could not be UTF-8-encoded.";
|
||||||
|
throw new ArgumentException (msg, "data");
|
||||||
|
}
|
||||||
|
|
||||||
if (bytes.LongLength <= WebSocket.FragmentLength)
|
if (bytes.LongLength <= WebSocket.FragmentLength)
|
||||||
broadcast (Opcode.Text, bytes, null);
|
broadcast (Opcode.Text, bytes, null);
|
||||||
|
Loading…
Reference in New Issue
Block a user