TsgcWSPClient_WAMP › Events › OnConnect
Fires when the underlying WebSocket (or raw TCP) transport has successfully connected to the server.
property OnConnect: TsgcWSConnectEvent;
// TsgcWSConnectEvent = procedure(Connection: TsgcWSConnection) of object
—
Indicates only that the transport is ready, not that a WAMP session has started. The server still needs to send its WELCOME frame before RPC or PubSub calls are valid — wait for OnWelcome to register subscriptions or issue initial calls. OnConnect is a good place to clear any local pending-call dictionaries or to log the transport-level event.
procedure TForm1.WAMPConnect(Connection: TsgcWSConnection);
begin
Memo1.Lines.Add('transport connected, waiting for WELCOME');
end;