Simpl
Simpl

Reputation: 2046

Remote Procedure Call - Service offered by client

I want to develop a Qt5/C++ client-server application using remote procedure calls (RPC).

Idea: The server listens for incoming connections of multiple clients. Clients offer a set of procedures/services the server can call in order to collect data from clients and inform other clients about changes.

And here is the catch: The RPC libs i've seen so far seem to expect the server to offer a service the clients may call. But I want to do the opposite. Clients should offer services the server may call. The direction is important, because I want to enable port forwarding on the server side only, not on the client side.

The libs I've checked are:

Questions:

Upvotes: 1

Views: 779

Answers (1)

kpayson64
kpayson64

Reputation: 349

gRPC supports bidirectional streaming, which may meet your needs.

Clients can open a long lived connection to a server, and then the server can "call" the clients by sending responses on the stream.

The client can respond by sending another message on the stream.

http://www.grpc.io/docs/tutorials/basic/c.html

Upvotes: 2

Related Questions