C# Класс Microsoft.AspNetCore.WebSockets.Protocol.HandshakeHelpers

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

CheckSupportedWebSocketRequest() публичный статический Метод

public static CheckSupportedWebSocketRequest ( string method, string>.IEnumerable headers ) : bool
method string
headers string>.IEnumerable
Результат bool

CreateRequestKey() публичный статический Метод

"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
Результат string

CreateResponseKey() публичный статический Метод

"...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
Результат string

GenerateResponseHeaders() публичный статический Метод

public static GenerateResponseHeaders ( string key, string subProtocol ) : string>>.IEnumerable
key string
subProtocol string
Результат string>>.IEnumerable

IsRequestKeyValid() публичный статический Метод

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
Результат bool

IsResponseKeyValid() публичный статический Метод

public static IsResponseKeyValid ( string value ) : bool
value string
Результат bool