|
|
|
@ -468,14 +468,14 @@ namespace WebSocketSharp.Server
|
|
|
|
/// </param>
|
|
|
|
/// </param>
|
|
|
|
public void BroadcastAsync (byte[] data, Action completed)
|
|
|
|
public void BroadcastAsync (byte[] data, Action completed)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var msg = _state.CheckIfAvailable (false, true, false) ??
|
|
|
|
if (_state != ServerState.Start) {
|
|
|
|
WebSocket.CheckSendParameter (data);
|
|
|
|
var msg = "The current state of the manager is not Start.";
|
|
|
|
|
|
|
|
throw new InvalidOperationException (msg);
|
|
|
|
if (msg != null) {
|
|
|
|
|
|
|
|
_logger.Error (msg);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (data == null)
|
|
|
|
|
|
|
|
throw new ArgumentNullException ("data");
|
|
|
|
|
|
|
|
|
|
|
|
if (data.LongLength <= WebSocket.FragmentLength)
|
|
|
|
if (data.LongLength <= WebSocket.FragmentLength)
|
|
|
|
broadcastAsync (Opcode.Binary, data, completed);
|
|
|
|
broadcastAsync (Opcode.Binary, data, completed);
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|