Discuss this help topic in SecureBlackbox Forum

TElWebSocketBase.OnCloseConnection

TElWebSocketBase     See also     


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


Reports a WebSocket session closure.

Declaration

[C#]
    event TSBWSCloseConnectionEvent OnCloseConnection;
    delegate void TSBWSCloseConnectionEvent(Object Sender, bool Remote, int CloseDescription);

[VB.NET]
    Event OnCloseConnection As TSBWSCloseConnectionEvent
    Delegate Sub TSBWSCloseConnectionEvent(ByVal Sender As Object, ByVal Remote As Boolean, ByVal CloseDescription As Integer)

[Pascal]
    property OnCloseConnection : TSBWSCloseConnectionEvent;
    TSBWSCloseConnectionEvent = procedure(Sender : TObject; Remote : boolean; CloseDescription : integer) of object;

[C++]
    void get_OnCloseConnection(TSBWSCloseConnectionEvent &pMethodOutResult, void * &pDataOutResult);
    void set_OnCloseConnection(TSBWSCloseConnectionEvent pMethodValue, void * pDataValue);
    typedef void (SB_CALLBACK *TSBWSCloseConnectionEvent)(void * _ObjectData, TObjectHandle Sender, int8_t Remote, int32_t CloseDescription);

[PHP]
    TSBWSCloseConnectionEvent|callable|NULL get_OnCloseConnection()
    void set_OnCloseConnection(TSBWSCloseConnectionEvent|callable|NULL $Value)
    callable TSBWSCloseConnectionEvent(TObject $Sender, bool $Remote, integer $CloseDescription)

[Java]
    TSBWSCloseConnectionEvent getOnCloseConnection();
    void setOnCloseConnection(TSBWSCloseConnectionEvent Value);
    TSBWSCloseConnectionEvent.Callback OnCloseConnection = new TSBWSCloseConnectionEvent.Callback() {
        public void TSBWSCloseConnectionEventCallback(TObject Sender, boolean Remote, int CloseDescription) {
            //...
        }
    }

Parameters

  • Remote - specifies whether the closure was requested by the remote endpoint.
  • CloseDescription - specifies the close reason (WebSocket status code).

WebSocket status codes:

Description

    This event is fired before the component closes a WebSocket connection. If Remote parameter is True, the connection is closed in response to a Close (0x8) frame received from the peer.

See also:     Close     Active    

Discuss this help topic in SecureBlackbox Forum