Hello
while EzRpcServer is a very easy two liner to use on its own (see
ez-rpc.h), it is daunting to use RPC outside this context.
My application is a data collection agent. While it is gathering data
from its sources as a TCP client, at the same time it also serves this
data to other clients connecting to it using capnp RPC. It uses ASIO as
an event loop, but the problem would not change when using kj's event
loop. To detach the data collector from the RPC server, I want to launch
the RPC server in a thread of its own.
The problem I am facing is how to shut down the RPC server thread from
listening and its (long running) clients explicitly so that the main
thread can join() the RPC thread. While EzRpcServer implementation is
very short, I have no clue as to where I should start.
Since the RPC server is running in a thread of its own, it can run its
own EventPort, although merging it into ASIO's event loop would be the
silver bullet, but I guess quite an integrate task.
In the long run, I would also like to use RPC Client from a Qt
application, this time it should be running instde Qt's event loop, but
that is another story.
Any hints would be very welcome
Mit freundlichem Gruß
Richard Hacker
--
------------------------------------------------------------------------
Richard Hacker M.Sc.
richard...@igh.de
Tel.:
+49 201 / 36014-16
Ingenieurgemeinschaft IgH
Gesellschaft für Ingenieurleistungen mbH
Nordsternstraße 66
D-45329 Essen
Amtsgericht Essen HRB 11500
USt-Id.-Nr.: DE 174 626 722
Geschäftsführung:
- Dr.-Ing. Siegfried Rotthäuser
- Dr. Sven Beermann, Prokurist
Tel.: +49 201 / 360-14-0
http://www.igh.de
------------------------------------------------------------------------