WebSocketHTTPHeader

public enum WebSocketHTTPHeader

Undocumented

  • Creates a new URLRequest based off the source URLRequest.

    Declaration

    Swift

    public static func createUpgrade(request: URLRequest, supportsCompression: Bool, secKeyValue: String) -> URLRequest

    Parameters

    request

    the request to “upgrade” the WebSocket request by adding headers.

    supportsCompression

    set if the client support text compression.

    secKeyName

    the security key to use in the WebSocket request. https://tools.ietf.org/html/rfc6455#section-1.3

    Return Value

    A URLRequest request to be converted to data and sent to the server.

  • Undocumented

    Declaration

    Swift

    public static func generateWebSocketKey() -> String