Fix due to the modified WebSocket.cs
This commit is contained in:
@@ -125,7 +125,7 @@ namespace WebSocketSharp.Server {
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method
|
||||
#region Private Methods
|
||||
|
||||
private Dictionary<string, WebSocketService> copySessions()
|
||||
{
|
||||
@@ -175,10 +175,7 @@ namespace WebSocketSharp.Server {
|
||||
lock (_syncRoot)
|
||||
{
|
||||
foreach (var service in _sessions.Values)
|
||||
if (_isStopped || _isSweeping)
|
||||
service.Send(data);
|
||||
else
|
||||
service.SendAsync(data);
|
||||
service.Send(data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,10 +184,7 @@ namespace WebSocketSharp.Server {
|
||||
lock (_syncRoot)
|
||||
{
|
||||
foreach (var service in _sessions.Values)
|
||||
if (_isStopped || _isSweeping)
|
||||
service.Send(data);
|
||||
else
|
||||
service.SendAsync(data);
|
||||
service.Send(data);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -193,26 +193,6 @@ namespace WebSocketSharp.Server {
|
||||
_socket.Send(data);
|
||||
}
|
||||
|
||||
public void SendAsync(byte[] data)
|
||||
{
|
||||
WaitCallback sendCb = (state) =>
|
||||
{
|
||||
Send(data);
|
||||
};
|
||||
|
||||
ThreadPool.QueueUserWorkItem(sendCb);
|
||||
}
|
||||
|
||||
public void SendAsync(string data)
|
||||
{
|
||||
WaitCallback sendCb = (state) =>
|
||||
{
|
||||
Send(data);
|
||||
};
|
||||
|
||||
ThreadPool.QueueUserWorkItem(sendCb);
|
||||
}
|
||||
|
||||
public void SendTo(string id, byte[] data)
|
||||
{
|
||||
if (!IsBound)
|
||||
|
Reference in New Issue
Block a user