TsgcWSPClient_FilesEvents › OnConnect

OnConnect Event

Fires after the WebSocket handshake completes and the Files subprotocol is ready to transfer files.

Syntax

property OnConnect: TsgcWSConnectEvent;
// TsgcWSConnectEvent = procedure(Connection: TsgcWSConnection) of object

Default Value

Remarks

Use this event to issue Subscribe calls or trigger a SendFile once the connection is ready. Connection carries the underlying TsgcWSConnection on which the QoS timer for fragmented transfers is also started.

Example

procedure TForm1.oProtocolConnect(Connection: TsgcWSConnection);
begin
  oProtocol.Subscribe('files.incoming');
end;

Back to Events