Fix a few words

This commit is contained in:
sta 2013-05-07 02:19:31 +09:00
parent 3ec3bf8fc9
commit 9a3c6632de
24 changed files with 108 additions and 108 deletions

View File

@ -1,10 +1,10 @@
#region MIT License
#region License
/*
* ByteOrder.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

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* CloseStatusCode.cs
*
@ -49,59 +49,59 @@ namespace WebSocketSharp {
/// <summary>
/// Equivalent to close status 1000. Indicates a normal closure.
/// </summary>
NORMAL = 1000,
NORMAL = 1000,
/// <summary>
/// Equivalent to close status 1001. Indicates that an endpoint is "going away".
/// </summary>
AWAY = 1001,
AWAY = 1001,
/// <summary>
/// Equivalent to close status 1002. Indicates that an endpoint is terminating the connection
/// due to a protocol error.
/// </summary>
PROTOCOL_ERROR = 1002,
PROTOCOL_ERROR = 1002,
/// <summary>
/// Equivalent to close status 1003. Indicates that an endpoint is terminating the connection
/// because it has received a type of data it cannot accept.
/// </summary>
INCORRECT_DATA = 1003,
INCORRECT_DATA = 1003,
/// <summary>
/// Equivalent to close status 1004. Still undefined. Reserved value.
/// </summary>
UNDEFINED = 1004,
UNDEFINED = 1004,
/// <summary>
/// Equivalent to close status 1005. Indicates that no status code was actually present. Reserved value.
/// </summary>
NO_STATUS_CODE = 1005,
NO_STATUS_CODE = 1005,
/// <summary>
/// Equivalent to close status 1006. Indicates that the connection was closed abnormally. Reserved value.
/// </summary>
ABNORMAL = 1006,
ABNORMAL = 1006,
/// <summary>
/// Equivalent to close status 1007. Indicates that an endpoint is terminating the connection
/// because it has received data within a message that was not consistent with the type of the message.
/// </summary>
INCONSISTENT_DATA = 1007,
INCONSISTENT_DATA = 1007,
/// <summary>
/// Equivalent to close status 1008. Indicates that an endpoint is terminating the connection
/// because it has received a message that violates its policy.
/// </summary>
POLICY_VIOLATION = 1008,
POLICY_VIOLATION = 1008,
/// <summary>
/// Equivalent to close status 1009. Indicates that an endpoint is terminating the connection
/// because it has received a message that is too big for it to process.
/// </summary>
TOO_BIG = 1009,
TOO_BIG = 1009,
/// <summary>
/// Equivalent to close status 1010. Indicates that an endpoint (client) is terminating the connection
/// because it has expected the server to negotiate one or more extension, but the server didn't return
/// them in the response message of the WebSocket handshake.
/// </summary>
IGNORE_EXTENSION = 1010,
IGNORE_EXTENSION = 1010,
/// <summary>
/// Equivalent to close status 1011. Indicates that a server is terminating the connection because it encountered
/// an unexpected condition that prevented it from fulfilling the request.
/// </summary>
SERVER_ERROR = 1011,
SERVER_ERROR = 1011,
/// <summary>
/// Equivalent to close status 1015. Indicates that the connection was closed due to a failure to perform
/// a TLS handshake. Reserved value.

View File

@ -1,10 +1,10 @@
#region MIT License
#region License
/*
* ErrorEventArgs.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
@ -39,7 +39,7 @@ namespace WebSocketSharp {
/// </remarks>
public class ErrorEventArgs : EventArgs
{
#region Constructor
#region Internal Constructors
internal ErrorEventArgs(string message)
{
@ -48,7 +48,7 @@ namespace WebSocketSharp {
#endregion
#region Property
#region Public Properties
/// <summary>
/// Gets the error message.

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* Fin.cs
*
@ -32,7 +32,7 @@ namespace WebSocketSharp {
internal enum Fin : byte
{
MORE = 0x0,
MORE = 0x0,
FINAL = 0x1
}
}

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* Handshake.cs
*
@ -35,13 +35,13 @@ namespace WebSocketSharp {
internal abstract class Handshake {
#region Field
#region Protected Const Fields
protected const string _crlf = "\r\n";
#endregion
#region Constructor
#region Protected Constructors
protected Handshake()
{
@ -51,14 +51,14 @@ namespace WebSocketSharp {
#endregion
#region Properties
#region Public Properties
public NameValueCollection Headers { get; internal set; }
public Version ProtocolVersion { get; internal set; }
#endregion
#region Methods
#region Public Methods
public void AddHeader(string name, string value)
{

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* Mask.cs
*
@ -33,6 +33,6 @@ namespace WebSocketSharp {
internal enum Mask : byte
{
UNMASK = 0x0,
MASK = 0x1
MASK = 0x1
}
}

View File

@ -1,10 +1,10 @@
#region MIT License
#region License
/*
* SslStream.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
@ -34,7 +34,7 @@ namespace WebSocketSharp.Net.Security {
internal class SslStream : System.Net.Security.SslStream
{
#region Constructors
#region Public Constructors
public SslStream(NetworkStream innerStream)
: base(innerStream)
@ -70,7 +70,7 @@ namespace WebSocketSharp.Net.Security {
#endregion
#region Property
#region Public Properties
public bool DataAvailable {
get {

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* HttpListenerWebSocketContext.cs
*
@ -40,7 +40,7 @@ namespace WebSocketSharp.Net.WebSockets {
/// </remarks>
public class HttpListenerWebSocketContext : WebSocketContext
{
#region Fields
#region Private Fields
private HttpListenerContext _context;
private WebSocket _websocket;
@ -48,7 +48,7 @@ namespace WebSocketSharp.Net.WebSockets {
#endregion
#region Constructor
#region Internal Constructors
internal HttpListenerWebSocketContext(HttpListenerContext context)
{
@ -59,7 +59,7 @@ namespace WebSocketSharp.Net.WebSockets {
#endregion
#region Internal Property
#region Internal Properties
internal WsStream Stream {
get {
@ -290,7 +290,7 @@ namespace WebSocketSharp.Net.WebSockets {
#endregion
#region Internal Method
#region Internal Methods
internal void Close()
{

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* TcpListenerWebSocketContext.cs
*
@ -41,7 +41,7 @@ namespace WebSocketSharp.Net.WebSockets {
/// </remarks>
public class TcpListenerWebSocketContext : WebSocketContext
{
#region Fields
#region Private Fields
private CookieCollection _cookies;
private TcpClient _tcpClient;
@ -52,7 +52,7 @@ namespace WebSocketSharp.Net.WebSockets {
#endregion
#region Constructor
#region Internal Constructors
internal TcpListenerWebSocketContext(TcpClient tcpClient, bool secure)
{
@ -305,7 +305,7 @@ namespace WebSocketSharp.Net.WebSockets {
#endregion
#region Internal Method
#region Internal Methods
internal void Close()
{

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* WebSocketContext.cs
*
@ -41,7 +41,7 @@ namespace WebSocketSharp.Net.WebSockets {
/// </remarks>
public abstract class WebSocketContext {
#region Constructor
#region Protected Constructors
/// <summary>
/// Initializes a new instance of the <see cref="WebSocketSharp.Net.WebSockets.WebSocketContext"/> class.
@ -52,7 +52,7 @@ namespace WebSocketSharp.Net.WebSockets {
#endregion
#region Properties
#region Public Properties
/// <summary>
/// Gets the cookies used in the WebSocket opening handshake.

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* Rsv.cs
*
@ -33,6 +33,6 @@ namespace WebSocketSharp {
internal enum Rsv : byte
{
OFF = 0x0,
ON = 0x1
ON = 0x1
}
}

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* HttpRequestEventArgs.cs
*
@ -41,17 +41,17 @@ namespace WebSocketSharp.Server {
/// </remarks>
public class HttpRequestEventArgs : EventArgs
{
#region Constructor
#region Internal Constructors
internal HttpRequestEventArgs(HttpListenerContext context)
{
Request = context.Request;
Request = context.Request;
Response = context.Response;
}
#endregion
#region Properties
#region Public Properties
/// <summary>
/// Gets the HTTP request objects sent from a client.

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* HttpServer.cs
*
@ -59,7 +59,7 @@ namespace WebSocketSharp.Server {
/// </remarks>
public class HttpServer {
#region Fields
#region Private Fields
private bool _isWindows;
private HttpListener _listener;
@ -70,7 +70,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Constructors
#region Public Constructors
/// <summary>
/// Initializes a new instance of the <see cref="HttpServer"/> class that listens for incoming requests
@ -96,7 +96,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Properties
#region Public Properties
/// <summary>
/// Gets the port on which to listen for incoming requests.
@ -139,7 +139,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Events
#region Public Events
/// <summary>
/// Occurs when the server receives an HTTP CONNECT request.

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* IServiceHost.cs
*

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* ServiceHostManager.cs
*
@ -33,14 +33,14 @@ namespace WebSocketSharp.Server {
internal class ServiceHostManager {
#region Fields
#region Private Fields
private Dictionary<string, IServiceHost> _svcHosts;
private bool _sweeped;
#endregion
#region Constructor
#region Public Constructors
public ServiceHostManager()
{
@ -50,7 +50,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Properties
#region Public Properties
public int Count {
get {

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* WebSocketServer.cs
*
@ -44,7 +44,7 @@ namespace WebSocketSharp.Server {
/// </remarks>
public class WebSocketServer : WebSocketServerBase
{
#region Field
#region Private Fields
private ServiceHostManager _svcHosts;
@ -142,7 +142,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Properties
#region Public Properties
/// <summary>
/// Gets the collection of paths associated with the every WebSocket services that the server provides.
@ -179,7 +179,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Private Method
#region Private Methods
private void init()
{
@ -188,7 +188,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Protected Method
#region Protected Methods
/// <summary>
/// Accepts a WebSocket connection request.

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* WebSocketServerBase.cs
*
@ -43,7 +43,7 @@ namespace WebSocketSharp.Server {
/// </remarks>
public abstract class WebSocketServerBase {
#region Fields
#region Private Fields
private Thread _receiveRequestThread;
private IPAddress _address;
@ -55,7 +55,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Constructors
#region Protected Constructors
/// <summary>
/// Initializes a new instance of the <see cref="WebSocketServerBase"/> class.
@ -153,7 +153,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Protected Property
#region Protected Properties
/// <summary>
/// Gets or sets the WebSocket URL on which to listen for incoming connection attempts.
@ -226,7 +226,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Event
#region Public Events
/// <summary>
/// Occurs when the server gets an error.

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* WebSocketService.cs
*
@ -51,7 +51,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Public Constructor
#region Public Constructors
/// <summary>
/// Initializes a new instance of the <see cref="WebSocketService"/> class.

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* WebSocketServiceHost.cs
*
@ -48,13 +48,13 @@ namespace WebSocketSharp.Server {
public class WebSocketServiceHost<T> : WebSocketServerBase, IServiceHost
where T : WebSocketService, new()
{
#region Field
#region Private Fields
private WebSocketServiceManager _sessions;
#endregion
#region Internal Constructor
#region Internal Constructors
internal WebSocketServiceHost()
{
@ -180,7 +180,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Properties
#region Public Properties
/// <summary>
/// Gets or sets a value indicating whether the server cleans up the inactive clients periodically.
@ -217,7 +217,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Private Method
#region Private Methods
private void init()
{
@ -226,24 +226,7 @@ namespace WebSocketSharp.Server {
#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
#region Protected Method
#region Protected Methods
/// <summary>
/// Accepts a WebSocket connection request.
@ -307,5 +290,22 @@ namespace WebSocketSharp.Server {
}
#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
}
}

View File

@ -1,4 +1,4 @@
#region MIT License
#region License
/*
* WebSocketServiceManager.cs
*
@ -38,7 +38,7 @@ namespace WebSocketSharp.Server {
/// </summary>
public class WebSocketServiceManager {
#region Fields
#region Private Fields
private object _forSweep;
private volatile bool _isStopped;
@ -49,7 +49,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Constructor
#region Internal Constructors
internal WebSocketServiceManager()
{
@ -65,7 +65,7 @@ namespace WebSocketSharp.Server {
#endregion
#region Properties
#region Public Properties
/// <summary>
/// Gets the collection of IDs of active <see cref="WebSocketService"/> objects

View File

@ -383,7 +383,7 @@ namespace WebSocketSharp {
#endregion
#region Events
#region Public Events
/// <summary>
/// Occurs when the <see cref="WebSocket"/> receives a Close frame or the Close method is called.
@ -1384,9 +1384,9 @@ namespace WebSocketSharp {
#endregion
#region Internal Method
#region Internal Methods
// As Server
// As server
internal void Close(HttpStatusCode code)
{
close(code);

View File

@ -64,7 +64,7 @@ namespace WebSocketSharp {
/// One of the <see cref="CloseStatusCode"/> values that indicates the cause of the exception.
/// </value>
public CloseStatusCode Code {
get; internal set;
get; private set;
}
#endregion

View File

@ -1,10 +1,10 @@
#region MIT License
#region License
/*
* WsState.cs
*
* 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
* of this software and associated documentation files (the "Software"), to deal
@ -46,14 +46,14 @@ namespace WebSocketSharp {
/// <summary>
/// Equivalent to numeric value 1. Indicates that the connection is established and communication is possible.
/// </summary>
OPEN = 1,
OPEN = 1,
/// <summary>
/// Equivalent to numeric value 2. Indicates that the connection is going through the closing handshake, or the <b>Close</b> method has been invoked.
/// </summary>
CLOSING = 2,
CLOSING = 2,
/// <summary>
/// Equivalent to numeric value 3. Indicates that the connection has been closed or could not be opened.
/// </summary>
CLOSED = 3
CLOSED = 3
}
}