HandshakeHelpers HandshakeHelpers Class

Definition

public static class HandshakeHelpers
Public Module HandshakeHelpers
Inheritance
HandshakeHelpersHandshakeHelpers

Fields

NeededHeaders NeededHeaders

Gets request headers needed process the handshake on the server.

public static readonly IEnumerable<string> NeededHeaders
Public Shared ReadOnly NeededHeaders As IEnumerable(Of String)

Methods

CheckSupportedWebSocketRequest(String, IEnumerable<>>) CheckSupportedWebSocketRequest(String, IEnumerable(Of KeyValuePair(Of String, String)))

public static bool CheckSupportedWebSocketRequest(string method, IEnumerable<KeyValuePair<string, string>> headers)
Public Shared Function CheckSupportedWebSocketRequest(method As String, headers As IEnumerable(Of KeyValuePair(Of String, String))) As Boolean
Parameters
method
String String
Returns

CreateResponseKey(String) CreateResponseKey(String)

"...the base64-encoded SHA-1 of the concatenation of the |Sec-WebSocket-Key| (as a string, not base64-decoded) with the string '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'"

public static string CreateResponseKey(string requestKey)
Public Shared Function CreateResponseKey(requestKey As String) As String
Parameters
requestKey
String String
Returns

Equals(Object) Equals(Object)

Inherited from Object

Equals(Object, Object) Equals(Object, Object)

Inherited from Object

GenerateResponseHeaders(String, String) GenerateResponseHeaders(String, String)

public static IEnumerable<KeyValuePair<string, string>> GenerateResponseHeaders(string key, string subProtocol)
Public Shared Function GenerateResponseHeaders(key As String, subProtocol As String) As IEnumerable(Of KeyValuePair(Of String, String))
Parameters
subProtocol
String String
Returns

GetHashCode() GetHashCode()

Inherited from Object

GetType() GetType()

Inherited from Object

IsRequestKeyValid(String) IsRequestKeyValid(String)

Validates the Sec-WebSocket-Key request header "The value of this header field MUST be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded."

public static bool IsRequestKeyValid(string value)
Public Shared Function IsRequestKeyValid(value As String) As Boolean
Parameters
value
String String
Returns

MemberwiseClone() MemberwiseClone()

Inherited from Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from Object

ToString() ToString()

Inherited from Object