Discuss this help topic in SecureBlackbox Forum

TElWebSocketBase.Close

TElWebSocketBase     See also     


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


Gracefully closes the WebSocket connection.

Declaration

[C#]
    void Close(bool Silent);
    void Close(bool Silent, int CloseDescription);

[VB.NET]
    Sub Close(ByVal Silent As Boolean)
    Sub Close(ByVal Silent As Boolean, ByVal CloseDescription As Integer)

[Pascal]
    procedure Close(Silent : boolean);
    procedure Close(Silent : boolean; CloseDescription : integer);

[C++]
    void Close(bool Silent);
    void Close(bool Silent, int32_t CloseDescription);

[PHP]
    void Close(bool $Silent)
    void Close(bool $Silent, integer $CloseDescription)

[Java]
    void close(boolean Silent);
    void close(boolean Silent, int CloseDescription);

Parameters

  • Silent - specifies whether the closure notification should be sent to the peer.
  • CloseDescription - specifies the close reason or a status code, as defined in RFC 6455.

WebSocket status codes:

Description

    Call this method to close the WebSocket connection. If Silent parameter is False, a Close frame will be sent to another endpoint of the connection.

See also:     Active     OnCloseConnection    

Discuss this help topic in SecureBlackbox Forum