diff --git a/Example/Example.pidb b/Example/Example.pidb index 6551e3b0..feb19e6d 100644 Binary files a/Example/Example.pidb and b/Example/Example.pidb differ diff --git a/Example/Program.cs b/Example/Program.cs index 4fc67ff8..0121459e 100644 --- a/Example/Program.cs +++ b/Example/Program.cs @@ -116,7 +116,7 @@ namespace Example Console.Write("> "); data = Console.ReadLine(); if (data == "exit") - //if (data == "exit" || !ws.IsKeepAlive) + //if (data == "exit" || !ws.IsAlive) { break; } diff --git a/Example/bin/Debug_Ubuntu/example.exe b/Example/bin/Debug_Ubuntu/example.exe index a1ecdde1..a9777f9f 100755 Binary files a/Example/bin/Debug_Ubuntu/example.exe and b/Example/bin/Debug_Ubuntu/example.exe differ diff --git a/Example/bin/Debug_Ubuntu/example.exe.mdb b/Example/bin/Debug_Ubuntu/example.exe.mdb index 121eb411..8a27087d 100644 Binary files a/Example/bin/Debug_Ubuntu/example.exe.mdb and b/Example/bin/Debug_Ubuntu/example.exe.mdb differ diff --git a/Example/bin/Debug_Ubuntu/websocket-sharp.dll b/Example/bin/Debug_Ubuntu/websocket-sharp.dll index 49918c07..764c252c 100755 Binary files a/Example/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index e5032846..f63a5858 100644 Binary files a/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe b/Example1/bin/Debug_Ubuntu/example1.exe index 9ff655e7..4837cbb7 100755 Binary files a/Example1/bin/Debug_Ubuntu/example1.exe and b/Example1/bin/Debug_Ubuntu/example1.exe differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe.mdb b/Example1/bin/Debug_Ubuntu/example1.exe.mdb index 6dcbf017..5760a7fb 100644 Binary files a/Example1/bin/Debug_Ubuntu/example1.exe.mdb and b/Example1/bin/Debug_Ubuntu/example1.exe.mdb differ diff --git a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll index 49918c07..764c252c 100755 Binary files a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index e5032846..f63a5858 100644 Binary files a/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example1/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe b/Example2/bin/Debug_Ubuntu/example2.exe index 43edace7..27c01fbd 100755 Binary files a/Example2/bin/Debug_Ubuntu/example2.exe and b/Example2/bin/Debug_Ubuntu/example2.exe differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe.mdb b/Example2/bin/Debug_Ubuntu/example2.exe.mdb index d64e6578..4d39e0d2 100644 Binary files a/Example2/bin/Debug_Ubuntu/example2.exe.mdb and b/Example2/bin/Debug_Ubuntu/example2.exe.mdb differ diff --git a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll index 49918c07..764c252c 100755 Binary files a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index e5032846..f63a5858 100644 Binary files a/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example2/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index 60b2b5b8..c55a4d95 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -84,11 +84,11 @@ namespace WebSocketSharp.Server { } public WebSocketServer(int port) - : this("/", port) + : this(port, "/") { } - public WebSocketServer(string absPath, int port) + public WebSocketServer(int port, string absPath) { _uri = new Uri(absPath, UriKind.Relative); diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index 8518d6ab..74df5b35 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -153,35 +153,29 @@ namespace WebSocketSharp #region Properties - public string BinaryType - { + public string BinaryType { get { return _binaryType; } } - public ulong BufferedAmount - { - get - { + public ulong BufferedAmount { + get { ulong bufferedAmount = 0; lock (_unTransmittedBuffer.SyncRoot) { foreach (WsFrame frame in _unTransmittedBuffer) - { bufferedAmount += frame.PayloadLength; - } } return bufferedAmount; } } - public string Extensions - { + public string Extensions { get { return _extensions; } } - public bool IsKeepAlive { + public bool IsAlive { get { if (_readyState != WsState.OPEN) return false; @@ -196,17 +190,14 @@ namespace WebSocketSharp } } - public string Protocol - { + public string Protocol { get { return _protocol; } } - public WsState ReadyState - { + public WsState ReadyState { get { return _readyState; } - private set - { + private set { _readyState = value; switch (value) @@ -224,13 +215,11 @@ namespace WebSocketSharp } } - public SynchronizedCollection UnTransmittedBuffer - { + public SynchronizedCollection UnTransmittedBuffer { get { return _unTransmittedBuffer; } } - public string Url - { + public string Url { get { return _uri.ToString(); } } diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll index 49918c07..764c252c 100755 Binary files a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll and b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index e5032846..f63a5858 100644 Binary files a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/websocket-sharp/websocket-sharp.pidb b/websocket-sharp/websocket-sharp.pidb index e4755b18..7f9fb8fb 100644 Binary files a/websocket-sharp/websocket-sharp.pidb and b/websocket-sharp/websocket-sharp.pidb differ