TsgcWSAPIServer_MCPProperties › Server

Server Property

HTTP server instance that hosts the MCP endpoint (TsgcWebSocketHTTP_Server or TsgcWebSocketServer_HTTPAPI).

Syntax

property Server: TsgcWSComponent_Server read FServer write SetServer;

Default Value

Remarks

Links the MCP component to a running HTTP server. Assign either a TsgcWebSocketHTTP_Server or a TsgcWebSocketServer_HTTPAPI instance; the component registers its document handler as soon as the property is set. While Server is unassigned no HTTP traffic reaches the MCP engine, so remember to activate the server (Active := True) after wiring is complete. Only one MCP component should be attached per server endpoint.

Example

MCPServer.Server := sgcWebSocketHTTPServer1;
sgcWebSocketHTTPServer1.Port := 5052;
sgcWebSocketHTTPServer1.Active := True;

Back to Properties