TsgcWSPClient_sgcEvents › OnSession

OnSession Event

Fires after a successful connection or GetSession request with the assigned session Guid.

Syntax

property OnSession: TsgcWSSessionEvent;
// TsgcWSSessionEvent = procedure(Connection: TsgcWSConnection; Guid: string) of object

Default Value

Remarks

Guid is the session identifier assigned by the server. Store it if you need to reconnect to the same session later, or to pass it as aGuid on Publish, Broadcast, RPC or WriteData calls.

Example

procedure TForm1.oProtocolSession(Connection: TsgcWSConnection; Guid: string);
begin
  FSessionId := Guid;
end;

Back to Events