Discuss this help topic in SecureBlackbox Forum

TElWebSocketClient.CreateWebSocketKey

TElWebSocketClient     See also     


Filter: C#  VB.NET  Pascal  C++  PHP  Java  


Creates a new random key for a WebSocket handshake.

Declaration

[C#]
    static string CreateWebSocketKey();

[VB.NET]
    Shared Function CreateWebSocketKey() As String

[Pascal]
    class function CreateWebSocketKey : string;

[C++]
    static void CreateWebSocketKey(std::string &OutResult);

[PHP]
    string CreateWebSocketKey()

[Java]
    static String createWebSocketKey(TElWebSocketClient> this);

Parameters

Return value

Returns the base64-encoded random key.

Description

Use this method to create a new value for the Sec-WebSocket-Key header field. The WebSocket key is a nonce consisting of a randomly selected 16-byte value that has been base64-encoded, and is used in the server's handshake to indicate the acceptance of the connection. The unique key has to be generated for each new connection.

See also:     Constructor    

Discuss this help topic in SecureBlackbox Forum