TsgcWSPClient_WAMP › Properties › Client
References the TsgcWebSocketClient that carries WAMP v1 frames over a WebSocket connection.
property Client: TsgcWSComponent_WSClient read FClient write SetClient;
nil
Drop a TsgcWebSocketClient on the form and assign it to Client so that WAMP v1 messages travel as text frames inside the WebSocket session. The WebSocket client manages the transport (host, port, TLS, proxy, HTTP headers and subprotocol negotiation) while this component implements the WAMP RPC and PubSub layer on top. After assignment the WAMP session starts automatically when the server sends its WELCOME message on handshake completion. Negotiate the wamp subprotocol via WSClient.Specifications.WAMP := True (or set it in the component's subprotocol list). Use Broker instead when connecting over raw TCP.
WSClient := TsgcWebSocketClient.Create(nil);
WSClient.Host := 'wamp.example.com';
WSClient.Port := 80;
WSClient.Specifications.WAMP := True;
WAMP := TsgcWSPClient_WAMP.Create(nil);
WAMP.Client := WSClient;
WSClient.Active := True;