Skip to content

Client Request and Response #1178

Answered by elBoberido
hemalbavishi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @hemalbavishi
the easiest solution would be to create a server for each method and attach all this server to a listener.

Another option would be to have one server and create own message structs, e.g.

struct MessageBase {
    uint64_t command{0};
};

struct MessageFoo : public MessageBase {
    uint64_t dataFoo;
};

Then you have to set the command for each Message and circumvent the ServiceDescription which takes care of identifying a service. This is also only possible with the untyped API.

I would recommend to use the approach with multiple server since it is the easiest way to accomplish what you want.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hemalbavishi
Comment options

Answer selected by hemalbavishi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants