diff --git a/Example/Example.pidb b/Example/Example.pidb index f3229d6a..12730c7f 100644 Binary files a/Example/Example.pidb and b/Example/Example.pidb differ diff --git a/Example/bin/Debug/example.exe b/Example/bin/Debug/example.exe index 05489a9c..03e313c2 100755 Binary files a/Example/bin/Debug/example.exe and b/Example/bin/Debug/example.exe differ diff --git a/Example/bin/Debug/example.exe.mdb b/Example/bin/Debug/example.exe.mdb index a9c99d7e..3596e266 100644 Binary files a/Example/bin/Debug/example.exe.mdb and b/Example/bin/Debug/example.exe.mdb differ diff --git a/Example/bin/Debug/websocket-sharp.dll b/Example/bin/Debug/websocket-sharp.dll index 192cbeb8..de509c6d 100755 Binary files a/Example/bin/Debug/websocket-sharp.dll and b/Example/bin/Debug/websocket-sharp.dll differ diff --git a/Example/bin/Debug/websocket-sharp.dll.mdb b/Example/bin/Debug/websocket-sharp.dll.mdb index 78f49a8e..d8ba1d5c 100644 Binary files a/Example/bin/Debug/websocket-sharp.dll.mdb and b/Example/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example/bin/Debug_Ubuntu/example.exe b/Example/bin/Debug_Ubuntu/example.exe index 32893fc7..946f9e90 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 f571a7a2..5cc6cf4c 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 c1cfdb17..d098ed5e 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 91bece5c..0880aeab 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/Example/bin/Release/example.exe b/Example/bin/Release/example.exe index 0bd88a6f..78d906e7 100755 Binary files a/Example/bin/Release/example.exe and b/Example/bin/Release/example.exe differ diff --git a/Example/bin/Release/websocket-sharp.dll b/Example/bin/Release/websocket-sharp.dll index e7b2c38b..09cef2ee 100755 Binary files a/Example/bin/Release/websocket-sharp.dll and b/Example/bin/Release/websocket-sharp.dll differ diff --git a/Example/bin/Release_Ubuntu/example.exe b/Example/bin/Release_Ubuntu/example.exe index cea1e7f3..dee7da90 100755 Binary files a/Example/bin/Release_Ubuntu/example.exe and b/Example/bin/Release_Ubuntu/example.exe differ diff --git a/Example/bin/Release_Ubuntu/websocket-sharp.dll b/Example/bin/Release_Ubuntu/websocket-sharp.dll index 10b149f7..0e7c945d 100755 Binary files a/Example/bin/Release_Ubuntu/websocket-sharp.dll and b/Example/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example1/bin/Debug/example1.exe b/Example1/bin/Debug/example1.exe index 5c5bacb0..51eb29a4 100755 Binary files a/Example1/bin/Debug/example1.exe and b/Example1/bin/Debug/example1.exe differ diff --git a/Example1/bin/Debug/example1.exe.mdb b/Example1/bin/Debug/example1.exe.mdb index d45307ae..a26f6fcc 100644 Binary files a/Example1/bin/Debug/example1.exe.mdb and b/Example1/bin/Debug/example1.exe.mdb differ diff --git a/Example1/bin/Debug/websocket-sharp.dll b/Example1/bin/Debug/websocket-sharp.dll index 192cbeb8..de509c6d 100755 Binary files a/Example1/bin/Debug/websocket-sharp.dll and b/Example1/bin/Debug/websocket-sharp.dll differ diff --git a/Example1/bin/Debug/websocket-sharp.dll.mdb b/Example1/bin/Debug/websocket-sharp.dll.mdb index 78f49a8e..d8ba1d5c 100644 Binary files a/Example1/bin/Debug/websocket-sharp.dll.mdb and b/Example1/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example1/bin/Debug_Ubuntu/example1.exe b/Example1/bin/Debug_Ubuntu/example1.exe index 31a050bb..c8f2e07c 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 ab35e624..cce60c08 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 c1cfdb17..d098ed5e 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 91bece5c..0880aeab 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/Example1/bin/Release/example1.exe b/Example1/bin/Release/example1.exe index 11d00237..633c9e08 100755 Binary files a/Example1/bin/Release/example1.exe and b/Example1/bin/Release/example1.exe differ diff --git a/Example1/bin/Release/websocket-sharp.dll b/Example1/bin/Release/websocket-sharp.dll index e7b2c38b..09cef2ee 100755 Binary files a/Example1/bin/Release/websocket-sharp.dll and b/Example1/bin/Release/websocket-sharp.dll differ diff --git a/Example1/bin/Release_Ubuntu/example1.exe b/Example1/bin/Release_Ubuntu/example1.exe index e856ad6b..578b8092 100755 Binary files a/Example1/bin/Release_Ubuntu/example1.exe and b/Example1/bin/Release_Ubuntu/example1.exe differ diff --git a/Example1/bin/Release_Ubuntu/websocket-sharp.dll b/Example1/bin/Release_Ubuntu/websocket-sharp.dll index 10b149f7..0e7c945d 100755 Binary files a/Example1/bin/Release_Ubuntu/websocket-sharp.dll and b/Example1/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example2/bin/Debug/example2.exe b/Example2/bin/Debug/example2.exe index a4e4174e..27f9556a 100755 Binary files a/Example2/bin/Debug/example2.exe and b/Example2/bin/Debug/example2.exe differ diff --git a/Example2/bin/Debug/example2.exe.mdb b/Example2/bin/Debug/example2.exe.mdb index d1d16669..d8286522 100644 Binary files a/Example2/bin/Debug/example2.exe.mdb and b/Example2/bin/Debug/example2.exe.mdb differ diff --git a/Example2/bin/Debug/websocket-sharp.dll b/Example2/bin/Debug/websocket-sharp.dll index 192cbeb8..de509c6d 100755 Binary files a/Example2/bin/Debug/websocket-sharp.dll and b/Example2/bin/Debug/websocket-sharp.dll differ diff --git a/Example2/bin/Debug/websocket-sharp.dll.mdb b/Example2/bin/Debug/websocket-sharp.dll.mdb index 78f49a8e..d8ba1d5c 100644 Binary files a/Example2/bin/Debug/websocket-sharp.dll.mdb and b/Example2/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example2/bin/Debug_Ubuntu/example2.exe b/Example2/bin/Debug_Ubuntu/example2.exe index bb322af7..c59b221e 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 90019418..5a15dfc6 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 c1cfdb17..d098ed5e 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 91bece5c..0880aeab 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/Example2/bin/Release/example2.exe b/Example2/bin/Release/example2.exe index 2e90b8bb..3a3de3a0 100755 Binary files a/Example2/bin/Release/example2.exe and b/Example2/bin/Release/example2.exe differ diff --git a/Example2/bin/Release/websocket-sharp.dll b/Example2/bin/Release/websocket-sharp.dll index e7b2c38b..09cef2ee 100755 Binary files a/Example2/bin/Release/websocket-sharp.dll and b/Example2/bin/Release/websocket-sharp.dll differ diff --git a/Example2/bin/Release_Ubuntu/example2.exe b/Example2/bin/Release_Ubuntu/example2.exe index 21f35d7f..c52d6272 100755 Binary files a/Example2/bin/Release_Ubuntu/example2.exe and b/Example2/bin/Release_Ubuntu/example2.exe differ diff --git a/Example2/bin/Release_Ubuntu/websocket-sharp.dll b/Example2/bin/Release_Ubuntu/websocket-sharp.dll index 10b149f7..0e7c945d 100755 Binary files a/Example2/bin/Release_Ubuntu/websocket-sharp.dll and b/Example2/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/Example3/Example3.pidb b/Example3/Example3.pidb index c44355fb..05743e7d 100644 Binary files a/Example3/Example3.pidb and b/Example3/Example3.pidb differ diff --git a/Example3/Program.cs b/Example3/Program.cs index 1bb1b2f6..7c971a13 100644 --- a/Example3/Program.cs +++ b/Example3/Program.cs @@ -7,11 +7,12 @@ namespace Example3 { public class Program { - private static HttpServer _httpsv; + private static HttpServer _httpsv; public static void Main(string[] args) { - _httpsv = new HttpServer(4649); + _httpsv = new HttpServer(4649); + _httpsv.AddService("/"); _httpsv.OnGet += (sender, e) => { diff --git a/Example3/bin/Debug/Example3.exe b/Example3/bin/Debug/Example3.exe index c015a430..a8f76062 100755 Binary files a/Example3/bin/Debug/Example3.exe and b/Example3/bin/Debug/Example3.exe differ diff --git a/Example3/bin/Debug/Example3.exe.mdb b/Example3/bin/Debug/Example3.exe.mdb index d73952b6..95acfe52 100644 Binary files a/Example3/bin/Debug/Example3.exe.mdb and b/Example3/bin/Debug/Example3.exe.mdb differ diff --git a/Example3/bin/Debug/websocket-sharp.dll b/Example3/bin/Debug/websocket-sharp.dll index 192cbeb8..de509c6d 100755 Binary files a/Example3/bin/Debug/websocket-sharp.dll and b/Example3/bin/Debug/websocket-sharp.dll differ diff --git a/Example3/bin/Debug/websocket-sharp.dll.mdb b/Example3/bin/Debug/websocket-sharp.dll.mdb index 78f49a8e..d8ba1d5c 100644 Binary files a/Example3/bin/Debug/websocket-sharp.dll.mdb and b/Example3/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe b/Example3/bin/Debug_Ubuntu/Example3.exe index bd2c0037..e9cbe2d3 100755 Binary files a/Example3/bin/Debug_Ubuntu/Example3.exe and b/Example3/bin/Debug_Ubuntu/Example3.exe differ diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe.mdb b/Example3/bin/Debug_Ubuntu/Example3.exe.mdb index 5fcecc8c..30852e11 100644 Binary files a/Example3/bin/Debug_Ubuntu/Example3.exe.mdb and b/Example3/bin/Debug_Ubuntu/Example3.exe.mdb differ diff --git a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll index c1cfdb17..d098ed5e 100755 Binary files a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll and b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll differ diff --git a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb index 91bece5c..0880aeab 100644 Binary files a/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb and b/Example3/bin/Debug_Ubuntu/websocket-sharp.dll.mdb differ diff --git a/Example3/bin/Release/Example3.exe b/Example3/bin/Release/Example3.exe index 886e61a4..9a3c4472 100755 Binary files a/Example3/bin/Release/Example3.exe and b/Example3/bin/Release/Example3.exe differ diff --git a/Example3/bin/Release/websocket-sharp.dll b/Example3/bin/Release/websocket-sharp.dll index e7b2c38b..09cef2ee 100755 Binary files a/Example3/bin/Release/websocket-sharp.dll and b/Example3/bin/Release/websocket-sharp.dll differ diff --git a/Example3/bin/Release_Ubuntu/Example3.exe b/Example3/bin/Release_Ubuntu/Example3.exe index 4912acc3..b786037d 100755 Binary files a/Example3/bin/Release_Ubuntu/Example3.exe and b/Example3/bin/Release_Ubuntu/Example3.exe differ diff --git a/Example3/bin/Release_Ubuntu/websocket-sharp.dll b/Example3/bin/Release_Ubuntu/websocket-sharp.dll index 10b149f7..0e7c945d 100755 Binary files a/Example3/bin/Release_Ubuntu/websocket-sharp.dll and b/Example3/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/README.md b/README.md index f6def7fa..8abbbf1e 100644 --- a/README.md +++ b/README.md @@ -241,10 +241,11 @@ wssv.Stop(); I modified System.Net.HttpListener, System.Net.HttpListenerContext and some others of [Mono] to create the HTTP server that the connection can be upgraded to the WebSocket connection if the HTTP server received a WebSocket request. -You can specify the WebSocket service in the same way as the WebSocket server. +You can add to your `HttpServer` any WebSocket service and a matching path to that service by using `HttpServer.AddService` method. ```cs -var httpsv = new HttpServer(4649); +var httpsv = new HttpServer(4649); +httpsv.AddService("/"); ``` For more information, please refer to the [Example3]. diff --git a/websocket-sharp/Net/HttpListenerContext.cs b/websocket-sharp/Net/HttpListenerContext.cs index f8258323..8e74b30b 100644 --- a/websocket-sharp/Net/HttpListenerContext.cs +++ b/websocket-sharp/Net/HttpListenerContext.cs @@ -169,9 +169,9 @@ namespace WebSocketSharp.Net { #region Public Method - public HttpListenerWebSocketContext AcceptWebSocket () + public HttpListenerWebSocketContext AcceptWebSocket (string path) { - return new HttpListenerWebSocketContext (this); + return new HttpListenerWebSocketContext (path, this); } #endregion diff --git a/websocket-sharp/Net/HttpListenerWebSocketContext.cs b/websocket-sharp/Net/HttpListenerWebSocketContext.cs index e0d24925..afc3f83e 100644 --- a/websocket-sharp/Net/HttpListenerWebSocketContext.cs +++ b/websocket-sharp/Net/HttpListenerWebSocketContext.cs @@ -40,10 +40,10 @@ namespace WebSocketSharp.Net { private HttpListenerContext _context; private WebSocket _socket; - internal HttpListenerWebSocketContext(HttpListenerContext context) + internal HttpListenerWebSocketContext(string path, HttpListenerContext context) { _context = context; - _socket = new WebSocket(this); + _socket = new WebSocket(path.ToUri(), this); } internal HttpListenerContext BaseContext { diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 0f586044..ebf2a9cf 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -27,6 +27,7 @@ #endregion using System; +using System.Collections.Generic; using System.Configuration; using System.IO; using System.Threading; @@ -34,18 +35,16 @@ using WebSocketSharp.Net; namespace WebSocketSharp.Server { - public class HttpServer - where T : WebSocketService, new() - { + public class HttpServer { + #region Fields - private Thread _acceptRequestThread; - private bool _isWindows; - private HttpListener _listener; - private int _port; - private string _rootPath; - private Uri _wsPath; - private WebSocketServer _wsServer; + private Thread _acceptRequestThread; + private bool _isWindows; + private HttpListener _listener; + private int _port; + private string _rootPath; + private Dictionary _wsServers; #endregion @@ -57,14 +56,8 @@ namespace WebSocketSharp.Server { } public HttpServer(int port) - : this(port, "/") { - } - - public HttpServer(int port, string wsPath) - { - _port = port; - _wsPath = wsPath.ToUri(); + _port = port; init(); } @@ -126,7 +119,7 @@ namespace WebSocketSharp.Server { { _isWindows = false; _listener = new HttpListener(); - _wsServer = new WebSocketServer(); + _wsServers = new Dictionary(); var os = Environment.OSVersion; if (os.Platform != PlatformID.Unix && os.Platform != PlatformID.MacOSX) @@ -163,11 +156,15 @@ namespace WebSocketSharp.Server { { if (req.IsWebSocketRequest) { - upgradeToWebSocket(context); - return; - } + if (upgradeToWebSocket(context)) + return; - res.StatusCode = (int)HttpStatusCode.BadRequest; + res.StatusCode = (int)HttpStatusCode.NotImplemented; + } + else + { + res.StatusCode = (int)HttpStatusCode.BadRequest; + } } else { @@ -254,19 +251,31 @@ namespace WebSocketSharp.Server { _acceptRequestThread.Start(); } - private void upgradeToWebSocket(HttpListenerContext context) + private bool upgradeToWebSocket(HttpListenerContext context) { - var wsContext = context.AcceptWebSocket(); + var path = context.Request.RawUrl; + if (!_wsServers.ContainsKey(path)) + return false; + + var wsContext = context.AcceptWebSocket(path); var socket = wsContext.WebSocket; - if (_wsPath.ToString() != "/") - socket.Url = _wsPath; - _wsServer.BindWebSocket(socket); + var wsServer = _wsServers[path]; + wsServer.BindWebSocket(socket); + + return true; } #endregion #region Public Methods + public void AddService(string path) + where T : WebSocketService, new() + { + var server = new WebSocketServer(); + _wsServers.Add(path, server); + } + public byte[] GetFile(string path) { var filePath = _rootPath + path; @@ -289,7 +298,8 @@ namespace WebSocketSharp.Server { { _listener.Close(); _acceptRequestThread.Join(5 * 1000); - _wsServer.StopServices(); + foreach (var server in _wsServers.Values) + server.Stop(); } #endregion diff --git a/websocket-sharp/Server/IWebSocketServer.cs b/websocket-sharp/Server/IWebSocketServer.cs new file mode 100644 index 00000000..3a82e258 --- /dev/null +++ b/websocket-sharp/Server/IWebSocketServer.cs @@ -0,0 +1,40 @@ +#region MIT License +/** + * IWebSocketServer.cs + * + * The MIT License + * + * Copyright (c) 2012 sta.blockhead + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ +#endregion + +using System; + +namespace WebSocketSharp.Server { + + public interface IWebSocketServer { + + void BindWebSocket(WebSocket socket); + void Start(); + void Stop(); + void StopServices(); + } +} diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index 879d3037..ea65943c 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -39,7 +39,7 @@ using WebSocketSharp.Frame; namespace WebSocketSharp.Server { - public class WebSocketServer + public class WebSocketServer : IWebSocketServer where T : WebSocketService, new() { #region Fields diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index 021c3ae3..5bcd9ab9 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -106,10 +106,10 @@ namespace WebSocketSharp #region Internal Constructor - internal WebSocket(HttpListenerWebSocketContext context) + internal WebSocket(Uri uri, HttpListenerWebSocketContext context) : this() { - _uri = new Uri("/", UriKind.Relative); + _uri = uri; _context = context; _isClient = false; _isSecure = _context.IsSecureConnection; @@ -356,14 +356,11 @@ namespace WebSocketSharp { if (send(frame) && !Thread.CurrentThread.IsBackground) { - if (_isClient) - { + if (_isClient && _msgThread != null) _msgThread.Join(5 * 1000); - } - else - { + + if (!_isClient && _exitedMessageLoop != null) _exitedMessageLoop.WaitOne(5 * 1000); - } } ReadyState = WsState.CLOSED; @@ -880,15 +877,21 @@ namespace WebSocketSharp { if (_unTransmittedBuffer.Count == 0) { - _wsStream.WriteFrame(frame); + if (_wsStream != null) + { + _wsStream.WriteFrame(frame); + return true; + } } - else + + if (_unTransmittedBuffer.Count > 0) { _unTransmittedBuffer.Add(frame); var msg = "Current data can not be sent because there is untransmitted data."; error(msg); - return false; } + + return false; } catch (Exception ex) { @@ -896,8 +899,6 @@ namespace WebSocketSharp error(ex.Message); return false; } - - return true; } private void send(Opcode opcode, PayloadData data) diff --git a/websocket-sharp/bin/Debug/websocket-sharp.dll b/websocket-sharp/bin/Debug/websocket-sharp.dll index 192cbeb8..de509c6d 100755 Binary files a/websocket-sharp/bin/Debug/websocket-sharp.dll and b/websocket-sharp/bin/Debug/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb b/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb index 78f49a8e..d8ba1d5c 100644 Binary files a/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb and b/websocket-sharp/bin/Debug/websocket-sharp.dll.mdb differ diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll index c1cfdb17..d098ed5e 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 91bece5c..0880aeab 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/bin/Release/websocket-sharp.dll b/websocket-sharp/bin/Release/websocket-sharp.dll index e7b2c38b..09cef2ee 100755 Binary files a/websocket-sharp/bin/Release/websocket-sharp.dll and b/websocket-sharp/bin/Release/websocket-sharp.dll differ diff --git a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll index 10b149f7..0e7c945d 100755 Binary files a/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll and b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/websocket-sharp/websocket-sharp.csproj b/websocket-sharp/websocket-sharp.csproj index 26785bd7..db28bacd 100644 --- a/websocket-sharp/websocket-sharp.csproj +++ b/websocket-sharp/websocket-sharp.csproj @@ -108,6 +108,7 @@ + diff --git a/websocket-sharp/websocket-sharp.pidb b/websocket-sharp/websocket-sharp.pidb index 70ca5396..f5351a8e 100644 Binary files a/websocket-sharp/websocket-sharp.pidb and b/websocket-sharp/websocket-sharp.pidb differ