TsgcWSPClient_sgcOlaylar › OnDisconnect

OnDisconnect Olay

Bağlantı kapatıldığında, kapatma kodunu raporlayarak tetiklenir.

Sözdizimi

property OnDisconnect: TsgcWSDisconnectEvent;
// TsgcWSDisconnectEvent = procedure(Connection: TsgcWSConnection; Code: Integer) of object

Varsayılan Değer

Remarks

İstemci tarafının bağlantısı kesildiğinde veya sunucu oturumu kapattığında tetiklenir. Code, WebSocket close durumudur (örneğin normal kapanış için 1000). Bu işleyici tetiklenmeden önce QoS zamanlayıcısı ve RPC listesi temizlenir.

Örnek

procedure TForm1.oProtocolDisconnect(Connection: TsgcWSConnection; Code: Integer);
begin
  Memo1.Lines.Add(Format('disconnected: %d', [Code]));
end;

Olaylara Dön