Discuss this help topic in SecureBlackbox Forum


TElWebSocketClient     See also     

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

Creates a new random key for a WebSocket handshake.


    static string CreateWebSocketKey();

    Shared Function CreateWebSocketKey() As String

    class function CreateWebSocketKey : string;

    static void CreateWebSocketKey(std::string &OutResult);

    string CreateWebSocketKey()

Return value

Returns the base64-encoded random key.


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