Changed IsConnected to IsKeepAlive in WebSocket.cs

This commit is contained in:
sta
2012-09-03 11:55:52 +09:00
parent 3ef6d58f31
commit 85ef38084d
53 changed files with 52 additions and 57 deletions

View File

@@ -51,7 +51,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Constructor
#region Constructors
public WebSocketServer(string url)
{
@@ -83,6 +83,11 @@ namespace WebSocketSharp.Server {
_services = new Dictionary<string, WebSocketService>();
}
public WebSocketServer(int port)
: this("/", port)
{
}
public WebSocketServer(string absPath, int port)
{
_uri = new Uri(absPath, UriKind.Relative);
@@ -177,7 +182,7 @@ namespace WebSocketSharp.Server {
private void startService(TcpClient client)
{
WaitCallback startCb = (state) =>
WaitCallback startSv = (state) =>
{
try {
var socket = new WebSocket(_uri, client);
@@ -188,7 +193,7 @@ namespace WebSocketSharp.Server {
error(ex.Message);
}
};
ThreadPool.QueueUserWorkItem(startCb);
ThreadPool.QueueUserWorkItem(startSv);
}
#endregion