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

Binary file not shown.

View File

@@ -49,7 +49,7 @@ namespace Example
WaitCallback notifyMsg = state =>
{
while (ts.Enabled)
while (ts.Enabled || _msgQ.Count > 0)
{
Thread.Sleep(500);
@@ -73,9 +73,9 @@ namespace Example
ThreadPool.QueueUserWorkItem(notifyMsg);
using (WebSocket ws = new WebSocket("ws://echo.websocket.org", "echo"))
//using (WebSocket ws = new WebSocket("ws://echo.websocket.org", "echo"))
//using (WebSocket ws = new WebSocket("wss://echo.websocket.org", "echo"))
//using (WebSocket ws = new WebSocket("ws://localhost:4649"))
using (WebSocket ws = new WebSocket("ws://localhost:4649"))
{
ws.OnOpen += (sender, e) =>
{
@@ -116,7 +116,7 @@ namespace Example
Console.Write("> ");
data = Console.ReadLine();
if (data == "exit")
//if (data == "exit" || !ws.IsConnected)
//if (data == "exit" || !ws.IsKeepAlive)
{
break;
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.