Refactored WebSocketContext.cs
This commit is contained in:
parent
78261ff71c
commit
6575f56ed0
@ -34,7 +34,7 @@ using System.Security.Principal;
|
|||||||
namespace WebSocketSharp.Net.WebSockets
|
namespace WebSocketSharp.Net.WebSockets
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides access to the WebSocket connection request information.
|
/// Exposes the properties used for accessing the information in a WebSocket connection request.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The WebSocketContext class is an abstract class.
|
/// The WebSocketContext class is an abstract class.
|
||||||
@ -55,28 +55,26 @@ namespace WebSocketSharp.Net.WebSockets
|
|||||||
#region Public Properties
|
#region Public Properties
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the cookies used in the WebSocket connection request.
|
/// Gets the HTTP cookies included in the request.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="WebSocketSharp.Net.CookieCollection"/> that contains the
|
/// A <see cref="WebSocketSharp.Net.CookieCollection"/> that contains the cookies.
|
||||||
/// cookies.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract CookieCollection CookieCollection { get; }
|
public abstract CookieCollection CookieCollection { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the HTTP headers used in the WebSocket connection request.
|
/// Gets the HTTP headers included in the request.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="NameValueCollection"/> that contains the HTTP headers.
|
/// A <see cref="NameValueCollection"/> that contains the headers.
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract NameValueCollection Headers { get; }
|
public abstract NameValueCollection Headers { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the value of the Host header field used in the WebSocket connection
|
/// Gets the value of the Host header included in the request.
|
||||||
/// request.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="string"/> that represents the value of the Host header field.
|
/// A <see cref="string"/> that represents the value of the Host header.
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract string Host { get; }
|
public abstract string Host { get; }
|
||||||
|
|
||||||
@ -89,12 +87,10 @@ namespace WebSocketSharp.Net.WebSockets
|
|||||||
public abstract bool IsAuthenticated { get; }
|
public abstract bool IsAuthenticated { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether the client connected from the local
|
/// Gets a value indicating whether the client connected from the local computer.
|
||||||
/// computer.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// <c>true</c> if the client connected from the local computer; otherwise,
|
/// <c>true</c> if the client connected from the local computer; otherwise, <c>false</c>.
|
||||||
/// <c>false</c>.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract bool IsLocal { get; }
|
public abstract bool IsLocal { get; }
|
||||||
|
|
||||||
@ -102,28 +98,23 @@ namespace WebSocketSharp.Net.WebSockets
|
|||||||
/// Gets a value indicating whether the WebSocket connection is secured.
|
/// Gets a value indicating whether the WebSocket connection is secured.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// <c>true</c> if the WebSocket connection is secured; otherwise,
|
/// <c>true</c> if the connection is secured; otherwise, <c>false</c>.
|
||||||
/// <c>false</c>.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract bool IsSecureConnection { get; }
|
public abstract bool IsSecureConnection { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicating whether the request is a WebSocket connection
|
/// Gets a value indicating whether the request is a WebSocket connection request.
|
||||||
/// request.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// <c>true</c> if the request is a WebSocket connection request; otherwise,
|
/// <c>true</c> if the request is a WebSocket connection request; otherwise, <c>false</c>.
|
||||||
/// <c>false</c>.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract bool IsWebSocketRequest { get; }
|
public abstract bool IsWebSocketRequest { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the value of the Origin header field used in the WebSocket
|
/// Gets the value of the Origin header included in the request.
|
||||||
/// connection request.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="string"/> that represents the value of the Origin header
|
/// A <see cref="string"/> that represents the value of the Origin header.
|
||||||
/// field.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract string Origin { get; }
|
public abstract string Origin { get; }
|
||||||
|
|
||||||
@ -131,18 +122,15 @@ namespace WebSocketSharp.Net.WebSockets
|
|||||||
/// Gets the absolute path of the requested WebSocket URI.
|
/// Gets the absolute path of the requested WebSocket URI.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="string"/> that represents the absolute path of the requested
|
/// A <see cref="string"/> that represents the absolute path of the requested WebSocket URI.
|
||||||
/// WebSocket URI.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract string Path { get; }
|
public abstract string Path { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the collection of query string variables used in the WebSocket
|
/// Gets the collection of query string variables included in the request.
|
||||||
/// connection request.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="NameValueCollection"/> that contains the collection of query
|
/// A <see cref="NameValueCollection"/> that contains the collection of query string variables.
|
||||||
/// string variables.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract NameValueCollection QueryString { get; }
|
public abstract NameValueCollection QueryString { get; }
|
||||||
|
|
||||||
@ -150,47 +138,41 @@ namespace WebSocketSharp.Net.WebSockets
|
|||||||
/// Gets the WebSocket URI requested by the client.
|
/// Gets the WebSocket URI requested by the client.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="Uri"/> that represents the WebSocket URI.
|
/// A <see cref="Uri"/> that represents the requested WebSocket URI.
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract Uri RequestUri { get; }
|
public abstract Uri RequestUri { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the value of the Sec-WebSocket-Key header field used in the
|
/// Gets the value of the Sec-WebSocket-Key header included in the request.
|
||||||
/// WebSocket connection request.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This property provides a part of the information used by the server to
|
/// This property provides a part of the information used by the server to prove that it
|
||||||
/// prove that it received a valid WebSocket connection request.
|
/// received a valid WebSocket connection request.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="string"/> that represents the value of the Sec-WebSocket-Key
|
/// A <see cref="string"/> that represents the value of the Sec-WebSocket-Key header.
|
||||||
/// header field.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract string SecWebSocketKey { get; }
|
public abstract string SecWebSocketKey { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the values of the Sec-WebSocket-Protocol header field used in the
|
/// Gets the values of the Sec-WebSocket-Protocol header included in the request.
|
||||||
/// WebSocket connection request.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This property represents the subprotocols requested from the client.
|
/// This property represents the subprotocols requested from the client.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// An IEnumerable<string> that contains the values of the
|
/// An IEnumerable<string> that contains the values of the Sec-WebSocket-Protocol header.
|
||||||
/// Sec-WebSocket-Protocol header field.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract IEnumerable<string> SecWebSocketProtocols { get; }
|
public abstract IEnumerable<string> SecWebSocketProtocols { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the value of the Sec-WebSocket-Version header field used in the
|
/// Gets the value of the Sec-WebSocket-Version header included in the request.
|
||||||
/// WebSocket connection request.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// This property represents the WebSocket protocol version of the connection.
|
/// This property represents the WebSocket protocol version.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="string"/> that represents the value of the
|
/// A <see cref="string"/> that represents the value of the Sec-WebSocket-Version header.
|
||||||
/// Sec-WebSocket-Version header field.
|
|
||||||
/// </value>
|
/// </value>
|
||||||
public abstract string SecWebSocketVersion { get; }
|
public abstract string SecWebSocketVersion { get; }
|
||||||
|
|
||||||
@ -203,8 +185,7 @@ namespace WebSocketSharp.Net.WebSockets
|
|||||||
public abstract System.Net.IPEndPoint ServerEndPoint { get; }
|
public abstract System.Net.IPEndPoint ServerEndPoint { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the client information (identity, authentication information and
|
/// Gets the client information (identity, authentication, and security roles).
|
||||||
/// security roles).
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="IPrincipal"/> that represents the client information.
|
/// A <see cref="IPrincipal"/> that represents the client information.
|
||||||
@ -220,8 +201,8 @@ namespace WebSocketSharp.Net.WebSockets
|
|||||||
public abstract System.Net.IPEndPoint UserEndPoint { get; }
|
public abstract System.Net.IPEndPoint UserEndPoint { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the WebSocket instance used for two-way communication between client
|
/// Gets the <see cref="WebSocketSharp.WebSocket"/> instance used for two-way communication
|
||||||
/// and server.
|
/// between client and server.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>
|
/// <value>
|
||||||
/// A <see cref="WebSocketSharp.WebSocket"/>.
|
/// A <see cref="WebSocketSharp.WebSocket"/>.
|
||||||
|
Loading…
Reference in New Issue
Block a user