RPCClient Class
(ServerIO::RPCClient)Generic RPC (remote procedure call) binary-message-based service client. More...
Header: | #include <IO/ServerIO/RPCClient.h> |
Public Functions
RPCClient(CDPBaseObject *parent, XMLElementEx *cdpConnectorXml, const std::function<void( unsigned int ) > &onConnect, const std::function<void() > &onDisconnect, const std::function<int( const MessagePacketHandle & ) > &onServerResponse) | |
void | FillNodeChildren(CDP::StudioAPI::NodeStream &serializer) const |
void | SendCall(MessagePacketHandle &procedureMessage) |
Detailed Description
Generic RPC (remote procedure call) binary-message-based service client.
See also CDPBaseObject.
Member Function Documentation
RPCClient::RPCClient(CDPBaseObject *parent, XMLElementEx *cdpConnectorXml, const std::function<void( unsigned int ) > &onConnect, const std::function<void() > &onDisconnect, const std::function<int( const MessagePacketHandle & ) > &onServerResponse)
Constructs a RPCClient object.
Any CDPBaseObject based node can create and use a instance of this class for easy RPC service connect and message exchange.
Parameters:
- parent - node that needs to exchange messages with the RPC service
- cdpConnectorXml - CDPConnector configuration XML that will be used to configure the RPCClient embedded CDPConnector
- onConnect - will be called on successful connection to the RPC service
- onDisconnect - will be called when connection to the RPC service is dropped
- onServerResponse - will be called on response (CM_RPC_RESPONSE) messages received from RPC service
See also CDPBaseObject.
void RPCClient::FillNodeChildren(CDP::StudioAPI::NodeStream &serializer) const
Should be called by the RPCClient user from the node FillNodeChildren(), to expose the embedded CDPConnector via StudioAPI (can be useful for connection status inspection)
void RPCClient::SendCall(MessagePacketHandle &procedureMessage)
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.