[Modify] Polish it
This commit is contained in:
parent
d6b75d5642
commit
cab8ce2ceb
@ -574,7 +574,8 @@ namespace WebSocketSharp.Server
|
|||||||
public void Broadcast (string data)
|
public void Broadcast (string data)
|
||||||
{
|
{
|
||||||
if (_state != ServerState.Start) {
|
if (_state != ServerState.Start) {
|
||||||
var msg = "The current state of the manager is not Start.";
|
var msg = "The current state of the service is not Start.";
|
||||||
|
|
||||||
throw new InvalidOperationException (msg);
|
throw new InvalidOperationException (msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,8 +583,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)) {
|
||||||
var msg = "It could not be UTF-8-encoded.";
|
var msg = "It could not be UTF-8-encoded.";
|
||||||
|
|
||||||
throw new ArgumentException (msg, "data");
|
throw new ArgumentException (msg, "data");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user