diff --git a/Example/bin/Debug_Ubuntu/example.exe b/Example/bin/Debug_Ubuntu/example.exe index db58ae88..44d145be 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 f2f8ffd4..0cd91be0 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 263f150d..44c92fba 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 064f6637..5bcb9896 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_Ubuntu/example.exe b/Example/bin/Release_Ubuntu/example.exe index c1c22726..bd313ec6 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 bdcc677b..ea398411 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_Ubuntu/example1.exe b/Example1/bin/Debug_Ubuntu/example1.exe index ea743608..31a1cc9c 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 fdffbc97..9f1f4939 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 263f150d..44c92fba 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 064f6637..5bcb9896 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_Ubuntu/example1.exe b/Example1/bin/Release_Ubuntu/example1.exe index 8be6d9ba..98960205 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 bdcc677b..ea398411 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_Ubuntu/example2.exe b/Example2/bin/Debug_Ubuntu/example2.exe index 56109290..c8d13080 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 248d1f26..6ddccbd9 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 263f150d..44c92fba 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 064f6637..5bcb9896 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_Ubuntu/example2.exe b/Example2/bin/Release_Ubuntu/example2.exe index 26c56889..31d8d4f3 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 bdcc677b..ea398411 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 02340dae..ae95211c 100644 Binary files a/Example3/Example3.pidb and b/Example3/Example3.pidb differ diff --git a/Example3/Program.cs b/Example3/Program.cs index 3811dcd6..f077c3fc 100644 --- a/Example3/Program.cs +++ b/Example3/Program.cs @@ -28,7 +28,7 @@ namespace Example3 _httpsv.Start(); Console.WriteLine("HTTP Server listening on port: {0} service path:", _httpsv.Port); - foreach (var path in _httpsv.ServicePath) + foreach (var path in _httpsv.ServicePaths) Console.WriteLine(" {0}", path); Console.WriteLine(); diff --git a/Example3/bin/Debug_Ubuntu/Example3.exe b/Example3/bin/Debug_Ubuntu/Example3.exe index e3cc31b0..173f8c95 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 dc2a375d..f1f6308d 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 263f150d..44c92fba 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 064f6637..5bcb9896 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_Ubuntu/Example3.exe b/Example3/bin/Release_Ubuntu/Example3.exe index 91e5f221..17fc324c 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 bdcc677b..ea398411 100755 Binary files a/Example3/bin/Release_Ubuntu/websocket-sharp.dll and b/Example3/bin/Release_Ubuntu/websocket-sharp.dll differ diff --git a/websocket-sharp/Server/HttpServer.cs b/websocket-sharp/Server/HttpServer.cs index 072f4acd..21fc16cb 100644 --- a/websocket-sharp/Server/HttpServer.cs +++ b/websocket-sharp/Server/HttpServer.cs @@ -4,7 +4,7 @@ * * The MIT License * - * Copyright (c) 2012 sta.blockhead + * Copyright (c) 2012-2013 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 @@ -40,12 +40,12 @@ namespace WebSocketSharp.Server { #region Fields - private Thread _acceptRequestThread; - private bool _isWindows; - private HttpListener _listener; - private int _port; - private string _rootPath; - private ServiceManager _services; + private Thread _acceptRequestThread; + private bool _isWindows; + private HttpListener _listener; + private int _port; + private string _rootPath; + private ServiceHostManager _svcHosts; #endregion @@ -70,19 +70,19 @@ namespace WebSocketSharp.Server { get { return _port; } } - public IEnumerable ServicePath { + public IEnumerable ServicePaths { get { - return _services.Path; + return _svcHosts.Paths; } } public bool Sweeped { get { - return _services.Sweeped; + return _svcHosts.Sweeped; } set { - _services.Sweeped = value; + _svcHosts.Sweeped = value; } } @@ -136,7 +136,7 @@ namespace WebSocketSharp.Server { { _isWindows = false; _listener = new HttpListener(); - _services = new ServiceManager(); + _svcHosts = new ServiceHostManager(); var os = Environment.OSVersion; if (os.Platform != PlatformID.Unix && os.Platform != PlatformID.MacOSX) @@ -278,7 +278,7 @@ namespace WebSocketSharp.Server { var path = wsContext.Path.UrlDecode(); IServiceHost svcHost; - if (!_services.TryGetServiceHost(path, out svcHost)) + if (!_svcHosts.TryGetServiceHost(path, out svcHost)) { res.StatusCode = (int)HttpStatusCode.NotImplemented; return false; @@ -307,7 +307,7 @@ namespace WebSocketSharp.Server { if (!Sweeped) svcHost.Sweeped = Sweeped; - _services.Add(absPath, svcHost); + _svcHosts.Add(absPath, svcHost); } public byte[] GetFile(string path) @@ -332,7 +332,7 @@ namespace WebSocketSharp.Server { { _listener.Close(); _acceptRequestThread.Join(5 * 1000); - _services.Stop(); + _svcHosts.Stop(); } #endregion diff --git a/websocket-sharp/Server/ServiceManager.cs b/websocket-sharp/Server/ServiceHostManager.cs similarity index 73% rename from websocket-sharp/Server/ServiceManager.cs rename to websocket-sharp/Server/ServiceHostManager.cs index 7f294ad1..9aa7fe66 100644 --- a/websocket-sharp/Server/ServiceManager.cs +++ b/websocket-sharp/Server/ServiceHostManager.cs @@ -1,10 +1,10 @@ #region MIT License /* - * ServiceManager.cs + * ServiceHostManager.cs * * The MIT License * - * Copyright (c) 2012 sta.blockhead + * Copyright (c) 2012-2013 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 @@ -31,20 +31,20 @@ using System.Collections.Generic; namespace WebSocketSharp.Server { - public class ServiceManager { + internal class ServiceHostManager { - #region Field + #region Fields - private Dictionary _services; + private Dictionary _svcHosts; private bool _sweeped; #endregion #region Constructor - public ServiceManager() + public ServiceHostManager() { - _services = new Dictionary(); + _svcHosts = new Dictionary(); _sweeped = true; } @@ -54,10 +54,22 @@ namespace WebSocketSharp.Server { public int Count { get { - return _services.Count; + return _svcHosts.Count; } } + public IEnumerable Paths { + get { + return _svcHosts.Keys; + } + } + + public IEnumerable ServiceHosts { + get { + return _svcHosts.Values; + } + } + public bool Sweeped { get { return _sweeped; @@ -67,49 +79,38 @@ namespace WebSocketSharp.Server { if (_sweeped ^ value) { _sweeped = value; - foreach (var svcHost in _services.Values) + foreach (var svcHost in _svcHosts.Values) svcHost.Sweeped = value; } } } - public IEnumerable Path { - get { - return _services.Keys; - } - } - - public IEnumerable ServiceHost { - get { - return _services.Values; - } - } - #endregion #region Public Methods public void Add(string absPath, IServiceHost svcHost) { - _services.Add(absPath.UrlDecode(), svcHost); + _svcHosts.Add(absPath.UrlDecode(), svcHost); } public void Broadcast(string data) { - foreach (var svcHost in _services.Values) + foreach (var svcHost in _svcHosts.Values) svcHost.Broadcast(data); } public void Stop() { - foreach (var svcHost in _services.Values) + foreach (var svcHost in _svcHosts.Values) svcHost.Stop(); - _services.Clear(); + + _svcHosts.Clear(); } public bool TryGetServiceHost(string absPath, out IServiceHost svcHost) { - return _services.TryGetValue(absPath, out svcHost); + return _svcHosts.TryGetValue(absPath, out svcHost); } #endregion diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index de8359f3..a463a95a 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -46,7 +46,7 @@ namespace WebSocketSharp.Server { { #region Field - private ServiceManager _services; + private ServiceHostManager _svcHosts; #endregion @@ -155,7 +155,7 @@ namespace WebSocketSharp.Server { var url = BaseUri.IsAbsoluteUri ? BaseUri.ToString().TrimEnd('/') : String.Empty; - foreach (var path in _services.Path) + foreach (var path in _svcHosts.Paths) yield return url + path; } } @@ -168,11 +168,11 @@ namespace WebSocketSharp.Server { /// public bool Sweeped { get { - return _services.Sweeped; + return _svcHosts.Sweeped; } set { - _services.Sweeped = value; + _svcHosts.Sweeped = value; } } @@ -182,7 +182,7 @@ namespace WebSocketSharp.Server { private void init() { - _services = new ServiceManager(); + _svcHosts = new ServiceHostManager(); } #endregion @@ -201,7 +201,7 @@ namespace WebSocketSharp.Server { var path = context.Path.UrlDecode(); IServiceHost svcHost; - if (!_services.TryGetServiceHost(path, out svcHost)) + if (!_svcHosts.TryGetServiceHost(path, out svcHost)) { socket.Close(HttpStatusCode.NotImplemented); return; @@ -243,7 +243,7 @@ namespace WebSocketSharp.Server { if (!Sweeped) svcHost.Sweeped = Sweeped; - _services.Add(absPath, svcHost); + _svcHosts.Add(absPath, svcHost); } /// @@ -254,7 +254,7 @@ namespace WebSocketSharp.Server { /// public void Broadcast(string data) { - _services.Broadcast(data); + _svcHosts.Broadcast(data); } /// @@ -263,7 +263,7 @@ namespace WebSocketSharp.Server { public override void Stop() { base.Stop(); - _services.Stop(); + _svcHosts.Stop(); } #endregion diff --git a/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Debug_Ubuntu/websocket-sharp.dll index 263f150d..44c92fba 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 064f6637..5bcb9896 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_Ubuntu/websocket-sharp.dll b/websocket-sharp/bin/Release_Ubuntu/websocket-sharp.dll index bdcc677b..ea398411 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/doc/html/WebSocketSharp.Server/HttpServer.html b/websocket-sharp/doc/html/WebSocketSharp.Server/HttpServer.html index b8a5f11b..1298496c 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/HttpServer.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/HttpServer.html @@ -284,7 +284,7 @@ [read-only]
- ServicePath + ServicePaths @@ -831,23 +831,23 @@ Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)
-

ServicePath Property

-
+

ServicePaths Property

+

Documentation for this section has not yet been entered.

Syntax

-
public IEnumerable<string> ServicePath { get; }
+
public IEnumerable<string> ServicePaths { get; }

Value

-
+
Documentation for this section has not yet been entered.

Remarks

-
+
Documentation for this section has not yet been entered.

Requirements

-
+
Namespace: WebSocketSharp.Server
Assembly: websocket-sharp (in websocket-sharp.dll)

diff --git a/websocket-sharp/doc/html/WebSocketSharp.Server/index.html b/websocket-sharp/doc/html/WebSocketSharp.Server/index.html index 40222c13..9ffd2896 100644 --- a/websocket-sharp/doc/html/WebSocketSharp.Server/index.html +++ b/websocket-sharp/doc/html/WebSocketSharp.Server/index.html @@ -226,14 +226,6 @@ Documentation for this section has not yet been entered. - - - ServiceManager - - - Documentation for this section has not yet been entered. - - SessionManager diff --git a/websocket-sharp/doc/html/index.html b/websocket-sharp/doc/html/index.html index 7c8714bb..22c62e0f 100644 --- a/websocket-sharp/doc/html/index.html +++ b/websocket-sharp/doc/html/index.html @@ -474,14 +474,6 @@ Documentation for this section has not yet been entered. - - - ServiceManager - - - Documentation for this section has not yet been entered. - - SessionManager diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml index 05aff49d..1e77029f 100644 --- a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml +++ b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/HttpServer.xml @@ -211,9 +211,9 @@ To be added. - - - + + + Property System.Collections.Generic.IEnumerable<System.String> diff --git a/websocket-sharp/doc/mdoc/WebSocketSharp.Server/ServiceManager.xml b/websocket-sharp/doc/mdoc/WebSocketSharp.Server/ServiceManager.xml.remove similarity index 100% rename from websocket-sharp/doc/mdoc/WebSocketSharp.Server/ServiceManager.xml rename to websocket-sharp/doc/mdoc/WebSocketSharp.Server/ServiceManager.xml.remove diff --git a/websocket-sharp/doc/mdoc/index.xml b/websocket-sharp/doc/mdoc/index.xml index d1c32f40..9a69216d 100644 --- a/websocket-sharp/doc/mdoc/index.xml +++ b/websocket-sharp/doc/mdoc/index.xml @@ -1,6 +1,6 @@ - + [00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 00 24 00 00 52 53 41 31 00 04 00 00 11 00 00 00 29 17 fb 89 fe c3 91 f7 2b cb 8b e2 61 d2 3f 05 93 6d 65 a8 9e 63 72 a6 f5 d5 2c f2 9d 20 fa 0b c0 70 6a f6 88 7e 8b 90 3f 39 f5 76 c8 48 e0 bb 7b b2 7b ed d3 10 a7 1a 0f 70 98 0f 7f f4 4b 53 09 d2 a5 ef 36 c3 56 b4 aa f0 91 72 63 25 07 89 e0 93 3e 3f 2e f2 b9 73 0e 12 15 5d 43 56 c3 f4 70 a5 89 fe f7 f6 ac 3e 77 c2 d8 d0 84 91 f4 0c d1 f3 8e dc c3 c3 b8 38 3d 0c bf 17 de 20 78 c1 ] @@ -70,7 +70,6 @@ - diff --git a/websocket-sharp/websocket-sharp.csproj b/websocket-sharp/websocket-sharp.csproj index 3bfb411a..5b610627 100644 --- a/websocket-sharp/websocket-sharp.csproj +++ b/websocket-sharp/websocket-sharp.csproj @@ -109,7 +109,6 @@ - @@ -120,6 +119,7 @@ + diff --git a/websocket-sharp/websocket-sharp.pidb b/websocket-sharp/websocket-sharp.pidb index fdc8f550..197c274a 100644 Binary files a/websocket-sharp/websocket-sharp.pidb and b/websocket-sharp/websocket-sharp.pidb differ