C# Class Microsoft.AspNetCore.WebSockets.Protocol.HandshakeHelpers

Afficher le fichier Open project: AdaptiveConsulting/ReactiveTraderCloud Class Usage Examples

Méthodes publiques

Méthode Description
CheckSupportedWebSocketRequest ( string method, string>.IEnumerable headers ) : bool
CreateRequestKey ( ) : string

"The value of this header field MUST be a nonce consisting of a randomly selected 16-byte value that has been base64-encoded."

CreateResponseKey ( string requestKey ) : 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'"

GenerateResponseHeaders ( string key, string subProtocol ) : string>>.IEnumerable
IsRequestKeyValid ( string value ) : bool

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."

IsResponseKeyValid ( string value ) : bool

Method Details

CheckSupportedWebSocketRequest() public static méthode

public static CheckSupportedWebSocketRequest ( string method, string>.IEnumerable headers ) : bool
method string
headers string>.IEnumerable
Résultat bool

CreateRequestKey() public static méthode

"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 CreateRequestKey ( ) : string
Résultat string

CreateResponseKey() public static méthode

"...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 CreateResponseKey ( string requestKey ) : string
requestKey string
Résultat string

GenerateResponseHeaders() public static méthode

public static GenerateResponseHeaders ( string key, string subProtocol ) : string>>.IEnumerable
key string
subProtocol string
Résultat string>>.IEnumerable

IsRequestKeyValid() public static méthode

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 IsRequestKeyValid ( string value ) : bool
value string
Résultat bool

IsResponseKeyValid() public static méthode

public static IsResponseKeyValid ( string value ) : bool
value string
Résultat bool