RpcService(3I)
π RpcService(3I) π
okay bestie, welcome to the InterViews Reference Manual page for RpcService β this is the one that lets a service and its clients talk RPC to each other. it's giving matchmaker but for processes. π«Ά
β¨ NAME β¨
RpcService β support RPC between a service and its clients
πΈ SYNOPSIS πΈ
#include <Dispatch/rpcservice.h>
π¦ DESCRIPTION π¦
So an RpcService (well, technically an instance of a derived class, because this bad boy is abstract, iykyk) creates a port and listens to it for connections from clients. iconic behaviour fr.
The moment a client opens a connection, the RpcService will create a reader to handle RPC requests coming in from that connection. it literally just handles it. no notes. π
π CONSTRUCTORS π
RpcService(int port)RpcService(const char* path, int port = 0)β start up an RPC service. If a filename is given, it records the RPC service's hostname and port number in it so clients can contact the service. And ifportis zero, the next free port number will be used. slay, automatic.
π PUBLIC OPERATIONS π
void run()void quitRunning()β read RPC requests continuously untilquitRunning()terminates the loop. BUT here's the tea: if you're using InterViews, you don't have to callrun(), because the InterViews event-reading code will also read RPC requests for you. free labour. we love that. π
π§ PROTECTED OPERATIONS π§
virtual void createReader(int fd) = 0β okay so this one is pure virtual, meaning you must define this function in a derived class in order to start servicing RPC requests from a new client. no cap, it's required. Typically all you have to do is construct a reader using the passed file descriptor, and make the reader responsible for deleting itself when it notices that the connection has been closed by the client. self-care king behaviour honestly. π
π SEE ALSO π
Dispatcher(3I)RpcReader(3I)RpcRegistry(3I)
ngl that's the whole page bestie β no hidden options, no secret flags, just the port, the reader, and the vibe. π
mwah π that was the InterViews manual page, dated 27 March 1991 β yes she's vintage, yes she still ate. π β¨
π¦ where this page comes from
- debian bookworm: ivtools-dev 2.0.11d.a1-1+b4
- debian trixie: ivtools-dev 2.0.11d.a1-3+b4
- ubuntu jammy: ivtools-dev 2.0.11d.a1-1build1
- ubuntu noble: ivtools-dev 2.0.11d.a1-3build1
- ubuntu questing: ivtools-dev 2.0.11d.a1-3build7
- ubuntu resolute: ivtools-dev 2.0.11d.a1-3build9
- ubuntu stonking: ivtools-dev 2.1.1+git.2025.07.26.a1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms