logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

RpcService - support RPC between a service and its clients

Constructors

RpcService(intport)RpcService(constchar*path,intport=0)
              Start up an RPC service.  If a filename is given, record  the  RPC  service's  hostname  and  port
              number  in  it so clients can contact the service.  If ``port'' is zero, the next free port number
              will be used.

Description

       An RpcService (actually, an instance of a derived class) creates a port and listens to it for connections
       from  clients.   When  a  client  opens  a  connection, the RpcService will create a reader to handle RPC
       requests from the connection.

Name

       RpcService - support RPC between a service and its clients

Protected Operations

virtualvoidcreateReader(intfd)=0
              You must define this function in a derived class in order to start servicing RPC requests  from  a
              new  client.   Typically  all  you  have  to  do  is  to  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.

Public Operations

voidrun()voidquitRunning()
              Read RPC requests continuously until ``quitRunning()''  terminates  the  loop.   If  you're  using
              InterViews,  you  don't  have  to call ``run()'' since the InterViews event-reading code will also
              read RPC requests.

See Also

Dispatcher(3I), RpcReader(3I), RpcRegistry(3I)

InterViews                                        27 March 1991                                   RpcService(3I)

Synopsis

#include<Dispatch/rpcservice.h>

See Also