TsgcWSPServer_WAMP › Properties › Server
References the TsgcWebSocketServer that carries WAMP v1 frames over accepted WebSocket connections.
property Server: TsgcWSComponent_Server read FServer write SetServer;
nil
Drop a TsgcWebSocketServer on the form and assign it to Server so that every incoming connection that negotiates the wamp subprotocol is handed to this component for WAMP v1 processing. The WebSocket server owns the transport (bindings, ports, TLS, authentication, compression, HTTP routing) while this component implements the WAMP RPC and PubSub layer on top, dispatching CALL, SUBSCRIBE, UNSUBSCRIBE, PUBLISH and PREFIX messages received from clients. Assigning Server automatically registers the subprotocol handler; setting it to nil unregisters it. Use Broker instead when accepting raw TCP connections.
WSServer := TsgcWebSocketServer.Create(nil);
WSServer.Port := 80;
WAMP := TsgcWSPServer_WAMP.Create(nil);
WAMP.Server := WSServer;
WSServer.Active := True;