TsgcWSPServer_FilesProperties › Server

Server Property

WebSocket server component hosting this Files subprotocol.

Syntax

property Server: TsgcWSComponent_Server read FServer write SetServer;

Default Value

Remarks

Assign the TsgcWebSocketServer (or compatible server) that will host this subprotocol. The subprotocol registers itself with the server on Loaded and handles all file-transfer messages for that server's clients. Server must be assigned before starting file transfers; otherwise SendFile and BroadcastFile have no target.

Example

oServer := TsgcWebSocketServer.Create(nil);
oFiles := TsgcWSPServer_Files.Create(nil);
oFiles.Server := oServer;
oServer.Active := True;

Back to Properties