Fix due to the modified WebSocket.cs

This commit is contained in:
sta
2012-11-05 16:15:12 +09:00
parent 2addc16f91
commit 8aab7bebe0
22 changed files with 57 additions and 29 deletions

View File

@@ -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);
}
}

View File

@@ -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)