Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rpcreader(3i) [debian man page]

RpcReader(3I)						    InterViews Reference Manual 					     RpcReader(3I)

NAME
RpcReader - read RPC requests from a client SYNOPSIS
#include <Dispatch/rpcreader.h> DESCRIPTION
An RpcReader reads RPC requests from an rpcstream which represents a connection to a client. When it reads an RPC request, it uses the request number to look up the address of a function in an array and calls that function to unmarshall the request's arguments and execute the request. An RpcReader is not instantiable; you have to implement a derived class which initializes the function array with addresses of static mem- ber functions to unmarshall RPC requests and which defines the action to be performed when the client closes the connection. The function array looks like this: typedef void (*PF)(RpcReader*, RpcHdr&, rpcstream&); PF* _function; Each function stored in the array should extract any arguments needed by the RPC request from the rpcstream, execute the RPC request, and insert any return values into the rpcstream so they can be sent back to the client. CONSTRUCTORS
RpcReader(rpcstream* client, int nfcns) RpcReader(int fd, int nfcns, boolean binary = true) If given a non-nil rpcstream, prepare to read RPC requests from the client using it. If given a nil rpcstream, just allocate the function array. If given a file descriptor, create a new rpcstream and prepare to read RPC requests from the client using it. ``nfcns'' sets the size of the function array that each constructor allocates. PROTECTED OPERATIONS
virtual int inputReady(int) Read an RPC request (only one request per call so the program can service RPC requests from multiple connections in round robin fashion). Look up the appropriate function in the reader's or another reader's function array and call it to handle the RPC request. Return the appropriate status to tell the Dispatcher whether to detach the RpcReader, call inputReady again, or wait for new data before calling inputReady again. A derived class should not need to redefine this function. virtual RpcReader* map(unsigned long reader) You can redefine this function to change which reader executes an RPC request after it's read. Ordinarily the same reader that reads an RPC request also executes it, but you can hand the request off to another reader as well. virtual void connectionClosed(int fd) = 0 You have to define this function since it may be your only chance to perform cleanup (such as deleting this) when the client closes the connection. SEE ALSO
RpcHdr(3I), RpcService(3I), rpcstream(3I) InterViews 27 March 1991 RpcReader(3I)

Check Out this Related Man Page

tapset::rpc(3stap)														tapset::rpc(3stap)

NAME
tapset::rpc - systemtap rpc tapset DESCRIPTION
sunrpc.clnt.create_client Create an RPC client See probe::sunrpc.clnt.create_client(3stap) for details. sunrpc.clnt.clone_client Clone an RPC client structure See probe::sunrpc.clnt.clone_client(3stap) for details. sunrpc.clnt.shutdown_client Shutdown an RPC client See probe::sunrpc.clnt.shutdown_client(3stap) for details. sunrpc.clnt.bind_new_program Bind a new RPC program to an existing client See probe::sunrpc.clnt.bind_new_program(3stap) for details. sunrpc.clnt.call_sync Make a synchronous RPC call See probe::sunrpc.clnt.call_sync(3stap) for details. sunrpc.clnt.call_async Make an asynchronous RPC call See probe::sunrpc.clnt.call_async(3stap) for details. sunrpc.clnt.restart_call Restart an asynchronous RPC call See probe::sunrpc.clnt.restart_call(3stap) for details. sunrpc.svc.register Register an RPC service with the local portmapper See probe::sunrpc.svc.register(3stap) for details. sunrpc.svc.create Create an RPC service See probe::sunrpc.svc.create(3stap) for details. sunrpc.svc.destroy Destroy an RPC service See probe::sunrpc.svc.destroy(3stap) for details. sunrpc.svc.process Process an RPC request See probe::sunrpc.svc.process(3stap) for details. sunrpc.svc.authorise An RPC request is to be authorised See probe::sunrpc.svc.authorise(3stap) for details. sunrpc.svc.recv Listen for the next RPC request on any socket See probe::sunrpc.svc.recv(3stap) for details. sunrpc.svc.send Return reply to RPC client See probe::sunrpc.svc.send(3stap) for details. sunrpc.svc.drop Drop RPC request See probe::sunrpc.svc.drop(3stap) for details. sunrpc.sched.new_task Create new task for the specified client See probe::sunrpc.sched.new_task(3stap) for details. sunrpc.sched.release_task Release all resources associated with a task See probe::sunrpc.sched.release_task(3stap) for details. sunrpc.sched.execute Execute the RPC `scheduler' See probe::sunrpc.sched.execute(3stap) for details. sunrpc.sched.delay Delay an RPC task See probe::sunrpc.sched.delay(3stap) for details. SEE ALSO
probe::sunrpc.clnt.create_client(3stap), probe::sunrpc.clnt.clone_client(3stap), probe::sunrpc.clnt.shutdown_client(3stap), probe::sunrpc.clnt.bind_new_program(3stap), probe::sunrpc.clnt.call_sync(3stap), probe::sunrpc.clnt.call_async(3stap), probe::sunrpc.clnt.restart_call(3stap), probe::sunrpc.svc.register(3stap), probe::sunrpc.svc.create(3stap), probe::sunrpc.svc.destroy(3stap), probe::sunrpc.svc.process(3stap), probe::sunrpc.svc.authorise(3stap), probe::sunrpc.svc.recv(3stap), probe::sunrpc.svc.send(3stap), probe::sunrpc.svc.drop(3stap), probe::sunrpc.sched.new_task(3stap), probe::sunrpc.sched.release_task(3stap), probe::sunrpc.sched.execute(3stap), probe::sunrpc.sched.delay(3stap), stap(1), stapprobes(3stap) IBM
--- tapset::rpc(3stap)
Man Page