Fix a few words
This commit is contained in:
parent
3ec3bf8fc9
commit
9a3c6632de
@ -1,10 +1,10 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* ByteOrder.cs
|
* ByteOrder.cs
|
||||||
*
|
*
|
||||||
* The MIT License
|
* 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
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* CloseStatusCode.cs
|
* CloseStatusCode.cs
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* ErrorEventArgs.cs
|
* ErrorEventArgs.cs
|
||||||
*
|
*
|
||||||
* The MIT License
|
* 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
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -39,7 +39,7 @@ namespace WebSocketSharp {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class ErrorEventArgs : EventArgs
|
public class ErrorEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
#region Constructor
|
#region Internal Constructors
|
||||||
|
|
||||||
internal ErrorEventArgs(string message)
|
internal ErrorEventArgs(string message)
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ namespace WebSocketSharp {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Property
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the error message.
|
/// Gets the error message.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* Fin.cs
|
* Fin.cs
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* Handshake.cs
|
* Handshake.cs
|
||||||
*
|
*
|
||||||
@ -35,13 +35,13 @@ namespace WebSocketSharp {
|
|||||||
|
|
||||||
internal abstract class Handshake {
|
internal abstract class Handshake {
|
||||||
|
|
||||||
#region Field
|
#region Protected Const Fields
|
||||||
|
|
||||||
protected const string _crlf = "\r\n";
|
protected const string _crlf = "\r\n";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor
|
#region Protected Constructors
|
||||||
|
|
||||||
protected Handshake()
|
protected Handshake()
|
||||||
{
|
{
|
||||||
@ -51,14 +51,14 @@ namespace WebSocketSharp {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
public NameValueCollection Headers { get; internal set; }
|
public NameValueCollection Headers { get; internal set; }
|
||||||
public Version ProtocolVersion { get; internal set; }
|
public Version ProtocolVersion { get; internal set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Methods
|
#region Public Methods
|
||||||
|
|
||||||
public void AddHeader(string name, string value)
|
public void AddHeader(string name, string value)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* Mask.cs
|
* Mask.cs
|
||||||
*
|
*
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* SslStream.cs
|
* SslStream.cs
|
||||||
*
|
*
|
||||||
* The MIT License
|
* 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
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@ -34,7 +34,7 @@ namespace WebSocketSharp.Net.Security {
|
|||||||
|
|
||||||
internal class SslStream : System.Net.Security.SslStream
|
internal class SslStream : System.Net.Security.SslStream
|
||||||
{
|
{
|
||||||
#region Constructors
|
#region Public Constructors
|
||||||
|
|
||||||
public SslStream(NetworkStream innerStream)
|
public SslStream(NetworkStream innerStream)
|
||||||
: base(innerStream)
|
: base(innerStream)
|
||||||
@ -70,7 +70,7 @@ namespace WebSocketSharp.Net.Security {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Property
|
#region Public Properties
|
||||||
|
|
||||||
public bool DataAvailable {
|
public bool DataAvailable {
|
||||||
get {
|
get {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* HttpListenerWebSocketContext.cs
|
* HttpListenerWebSocketContext.cs
|
||||||
*
|
*
|
||||||
@ -40,7 +40,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class HttpListenerWebSocketContext : WebSocketContext
|
public class HttpListenerWebSocketContext : WebSocketContext
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Private Fields
|
||||||
|
|
||||||
private HttpListenerContext _context;
|
private HttpListenerContext _context;
|
||||||
private WebSocket _websocket;
|
private WebSocket _websocket;
|
||||||
@ -48,7 +48,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor
|
#region Internal Constructors
|
||||||
|
|
||||||
internal HttpListenerWebSocketContext(HttpListenerContext context)
|
internal HttpListenerWebSocketContext(HttpListenerContext context)
|
||||||
{
|
{
|
||||||
@ -59,7 +59,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Property
|
#region Internal Properties
|
||||||
|
|
||||||
internal WsStream Stream {
|
internal WsStream Stream {
|
||||||
get {
|
get {
|
||||||
@ -290,7 +290,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Method
|
#region Internal Methods
|
||||||
|
|
||||||
internal void Close()
|
internal void Close()
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* TcpListenerWebSocketContext.cs
|
* TcpListenerWebSocketContext.cs
|
||||||
*
|
*
|
||||||
@ -41,7 +41,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class TcpListenerWebSocketContext : WebSocketContext
|
public class TcpListenerWebSocketContext : WebSocketContext
|
||||||
{
|
{
|
||||||
#region Fields
|
#region Private Fields
|
||||||
|
|
||||||
private CookieCollection _cookies;
|
private CookieCollection _cookies;
|
||||||
private TcpClient _tcpClient;
|
private TcpClient _tcpClient;
|
||||||
@ -52,7 +52,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor
|
#region Internal Constructors
|
||||||
|
|
||||||
internal TcpListenerWebSocketContext(TcpClient tcpClient, bool secure)
|
internal TcpListenerWebSocketContext(TcpClient tcpClient, bool secure)
|
||||||
{
|
{
|
||||||
@ -305,7 +305,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Method
|
#region Internal Methods
|
||||||
|
|
||||||
internal void Close()
|
internal void Close()
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* WebSocketContext.cs
|
* WebSocketContext.cs
|
||||||
*
|
*
|
||||||
@ -41,7 +41,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public abstract class WebSocketContext {
|
public abstract class WebSocketContext {
|
||||||
|
|
||||||
#region Constructor
|
#region Protected Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="WebSocketSharp.Net.WebSockets.WebSocketContext"/> class.
|
/// Initializes a new instance of the <see cref="WebSocketSharp.Net.WebSockets.WebSocketContext"/> class.
|
||||||
@ -52,7 +52,7 @@ namespace WebSocketSharp.Net.WebSockets {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the cookies used in the WebSocket opening handshake.
|
/// Gets the cookies used in the WebSocket opening handshake.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* Rsv.cs
|
* Rsv.cs
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* HttpRequestEventArgs.cs
|
* HttpRequestEventArgs.cs
|
||||||
*
|
*
|
||||||
@ -41,7 +41,7 @@ namespace WebSocketSharp.Server {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class HttpRequestEventArgs : EventArgs
|
public class HttpRequestEventArgs : EventArgs
|
||||||
{
|
{
|
||||||
#region Constructor
|
#region Internal Constructors
|
||||||
|
|
||||||
internal HttpRequestEventArgs(HttpListenerContext context)
|
internal HttpRequestEventArgs(HttpListenerContext context)
|
||||||
{
|
{
|
||||||
@ -51,7 +51,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the HTTP request objects sent from a client.
|
/// Gets the HTTP request objects sent from a client.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* HttpServer.cs
|
* HttpServer.cs
|
||||||
*
|
*
|
||||||
@ -59,7 +59,7 @@ namespace WebSocketSharp.Server {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class HttpServer {
|
public class HttpServer {
|
||||||
|
|
||||||
#region Fields
|
#region Private Fields
|
||||||
|
|
||||||
private bool _isWindows;
|
private bool _isWindows;
|
||||||
private HttpListener _listener;
|
private HttpListener _listener;
|
||||||
@ -70,7 +70,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Public Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="HttpServer"/> class that listens for incoming requests
|
/// Initializes a new instance of the <see cref="HttpServer"/> class that listens for incoming requests
|
||||||
@ -96,7 +96,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the port on which to listen for incoming requests.
|
/// Gets the port on which to listen for incoming requests.
|
||||||
@ -139,7 +139,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Events
|
#region Public Events
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when the server receives an HTTP CONNECT request.
|
/// Occurs when the server receives an HTTP CONNECT request.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* IServiceHost.cs
|
* IServiceHost.cs
|
||||||
*
|
*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* ServiceHostManager.cs
|
* ServiceHostManager.cs
|
||||||
*
|
*
|
||||||
@ -33,14 +33,14 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
internal class ServiceHostManager {
|
internal class ServiceHostManager {
|
||||||
|
|
||||||
#region Fields
|
#region Private Fields
|
||||||
|
|
||||||
private Dictionary<string, IServiceHost> _svcHosts;
|
private Dictionary<string, IServiceHost> _svcHosts;
|
||||||
private bool _sweeped;
|
private bool _sweeped;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor
|
#region Public Constructors
|
||||||
|
|
||||||
public ServiceHostManager()
|
public ServiceHostManager()
|
||||||
{
|
{
|
||||||
@ -50,7 +50,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
public int Count {
|
public int Count {
|
||||||
get {
|
get {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* WebSocketServer.cs
|
* WebSocketServer.cs
|
||||||
*
|
*
|
||||||
@ -44,7 +44,7 @@ namespace WebSocketSharp.Server {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public class WebSocketServer : WebSocketServerBase
|
public class WebSocketServer : WebSocketServerBase
|
||||||
{
|
{
|
||||||
#region Field
|
#region Private Fields
|
||||||
|
|
||||||
private ServiceHostManager _svcHosts;
|
private ServiceHostManager _svcHosts;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the collection of paths associated with the every WebSocket services that the server provides.
|
/// Gets the collection of paths associated with the every WebSocket services that the server provides.
|
||||||
@ -179,7 +179,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Private Method
|
#region Private Methods
|
||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
@ -188,7 +188,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Protected Method
|
#region Protected Methods
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Accepts a WebSocket connection request.
|
/// Accepts a WebSocket connection request.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* WebSocketServerBase.cs
|
* WebSocketServerBase.cs
|
||||||
*
|
*
|
||||||
@ -43,7 +43,7 @@ namespace WebSocketSharp.Server {
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public abstract class WebSocketServerBase {
|
public abstract class WebSocketServerBase {
|
||||||
|
|
||||||
#region Fields
|
#region Private Fields
|
||||||
|
|
||||||
private Thread _receiveRequestThread;
|
private Thread _receiveRequestThread;
|
||||||
private IPAddress _address;
|
private IPAddress _address;
|
||||||
@ -55,7 +55,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructors
|
#region Protected Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="WebSocketServerBase"/> class.
|
/// Initializes a new instance of the <see cref="WebSocketServerBase"/> class.
|
||||||
@ -153,7 +153,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Protected Property
|
#region Protected Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the WebSocket URL on which to listen for incoming connection attempts.
|
/// Gets or sets the WebSocket URL on which to listen for incoming connection attempts.
|
||||||
@ -226,7 +226,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Event
|
#region Public Events
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when the server gets an error.
|
/// Occurs when the server gets an error.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* WebSocketService.cs
|
* WebSocketService.cs
|
||||||
*
|
*
|
||||||
@ -51,7 +51,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Public Constructor
|
#region Public Constructors
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="WebSocketService"/> class.
|
/// Initializes a new instance of the <see cref="WebSocketService"/> class.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* WebSocketServiceHost.cs
|
* WebSocketServiceHost.cs
|
||||||
*
|
*
|
||||||
@ -48,13 +48,13 @@ namespace WebSocketSharp.Server {
|
|||||||
public class WebSocketServiceHost<T> : WebSocketServerBase, IServiceHost
|
public class WebSocketServiceHost<T> : WebSocketServerBase, IServiceHost
|
||||||
where T : WebSocketService, new()
|
where T : WebSocketService, new()
|
||||||
{
|
{
|
||||||
#region Field
|
#region Private Fields
|
||||||
|
|
||||||
private WebSocketServiceManager _sessions;
|
private WebSocketServiceManager _sessions;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Constructor
|
#region Internal Constructors
|
||||||
|
|
||||||
internal WebSocketServiceHost()
|
internal WebSocketServiceHost()
|
||||||
{
|
{
|
||||||
@ -180,7 +180,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether the server cleans up the inactive clients periodically.
|
/// Gets or sets a value indicating whether the server cleans up the inactive clients periodically.
|
||||||
@ -217,7 +217,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Private Method
|
#region Private Methods
|
||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
@ -226,24 +226,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Explicit Interface Implementation
|
#region Protected Methods
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Binds the specified <see cref="WebSocketContext"/> to a <see cref="WebSocketService"/> instance.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="context">
|
|
||||||
/// A <see cref="WebSocketContext"/> that contains the WebSocket connection request objects to bind.
|
|
||||||
/// </param>
|
|
||||||
void IServiceHost.BindWebSocket(WebSocketContext context)
|
|
||||||
{
|
|
||||||
T service = new T();
|
|
||||||
service.Bind(context, _sessions);
|
|
||||||
service.Start();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Protected Method
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Accepts a WebSocket connection request.
|
/// Accepts a WebSocket connection request.
|
||||||
@ -307,5 +290,22 @@ namespace WebSocketSharp.Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Explicit Interface Implementation
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Binds the specified <see cref="WebSocketContext"/> to a <see cref="WebSocketService"/> instance.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="context">
|
||||||
|
/// A <see cref="WebSocketContext"/> that contains the WebSocket connection request objects to bind.
|
||||||
|
/// </param>
|
||||||
|
void IServiceHost.BindWebSocket(WebSocketContext context)
|
||||||
|
{
|
||||||
|
T service = new T();
|
||||||
|
service.Bind(context, _sessions);
|
||||||
|
service.Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* WebSocketServiceManager.cs
|
* WebSocketServiceManager.cs
|
||||||
*
|
*
|
||||||
@ -38,7 +38,7 @@ namespace WebSocketSharp.Server {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class WebSocketServiceManager {
|
public class WebSocketServiceManager {
|
||||||
|
|
||||||
#region Fields
|
#region Private Fields
|
||||||
|
|
||||||
private object _forSweep;
|
private object _forSweep;
|
||||||
private volatile bool _isStopped;
|
private volatile bool _isStopped;
|
||||||
@ -49,7 +49,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Constructor
|
#region Internal Constructors
|
||||||
|
|
||||||
internal WebSocketServiceManager()
|
internal WebSocketServiceManager()
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ namespace WebSocketSharp.Server {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Properties
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the collection of IDs of active <see cref="WebSocketService"/> objects
|
/// Gets the collection of IDs of active <see cref="WebSocketService"/> objects
|
||||||
|
@ -383,7 +383,7 @@ namespace WebSocketSharp {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Events
|
#region Public Events
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Occurs when the <see cref="WebSocket"/> receives a Close frame or the Close method is called.
|
/// Occurs when the <see cref="WebSocket"/> receives a Close frame or the Close method is called.
|
||||||
@ -1384,9 +1384,9 @@ namespace WebSocketSharp {
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Internal Method
|
#region Internal Methods
|
||||||
|
|
||||||
// As Server
|
// As server
|
||||||
internal void Close(HttpStatusCode code)
|
internal void Close(HttpStatusCode code)
|
||||||
{
|
{
|
||||||
close(code);
|
close(code);
|
||||||
|
@ -64,7 +64,7 @@ namespace WebSocketSharp {
|
|||||||
/// One of the <see cref="CloseStatusCode"/> values that indicates the cause of the exception.
|
/// One of the <see cref="CloseStatusCode"/> values that indicates the cause of the exception.
|
||||||
/// </value>
|
/// </value>
|
||||||
public CloseStatusCode Code {
|
public CloseStatusCode Code {
|
||||||
get; internal set;
|
get; private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#region MIT License
|
#region License
|
||||||
/*
|
/*
|
||||||
* WsState.cs
|
* WsState.cs
|
||||||
*
|
*
|
||||||
* The MIT License
|
* The MIT License
|
||||||
*
|
*
|
||||||
* Copyright (c) 2010-2012 sta.blockhead
|
* Copyright (c) 2010-2013 sta.blockhead
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user