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

rpc(3)							     Library Functions Manual							    rpc(3)

NAME
rpc, rpc_functions - Library routines for ONC remote procedure calls DESCRIPTION
These routines allow C programs to make procedure calls on other machines across the network. First, the client calls a procedure to send a data packet to the server. Upon receipt of the packet, the server calls a dispatch routine to perform the requested service, and then sends back a reply. Finally, the procedure call returns to the client. The RPC subroutines and macros are grouped in the following categories: Client RPC routines (described in rpc_clnt(3)) Calls a remote pro- cedure on a remote system. Broadcasts a call message to all locally connected broadcast nets. Calls the remote procedure that is associ- ated with a specified client handle. Creates a generic RPC client. Change or retrieves various information about a client object. Destroys the client's RPC handle. Frees any data allocated by the RPC/XDR system. Copies the error structure out of the client handle. Prints a message to standard error indicating why a client RPC handle could not be created. Prints a message to standard error correspond- ing to a condition. Prints a message to standard error indicating why an RPC call failed. Returns a string indicating why a client RPC handle could not be created. Returns a pointer to a string that indicates why an RPC call failed. Returns a string that indicates why an RPC call failed. Creates a toy RPC client for a remote program. Creates an RPC client that uses the TCP/IP transport. Creates an RPC client that uses the UDP/IP transport. Server RPC routines (described in rpc_svc(3)) Destroys the RPC service transport handle. Specifies the RPC service side's read file descriptor bit mask. Frees any data allocated by the RPC/XDR system. Decodes the arguments of an RPC request. Gets the network address of the caller. Services an RPC request. Services an RPC request. Maps a program with a service dis- patch procedure. Waits and services RPC requests. Send the results of a remote procedure call. Removes the mapping of program to service dispatch procedures. Processes incorrect authentication errors. Processes parameter decoding errors. Processes procedure number errors. Processes program registration errors. Processes program registration errors. Processes system errors. Processes insufficient authenti- cation errors. Creates an RPC service on top of any open descriptor. Creates a toy RPC service transport. Creates a TCP/IP-based RPC service transport. Creates a UDP/IP-based RPC service transport. RPC XDR routines (described in rpc_xdr(3)) Encodes RPC reply messages. Describes UNIX credentials. Describes RPC call header messages. Describes RPC call messages. Describes RPC authentication information messages. Describes RPC reply messages. Describes RPC reply messages. Miscellaneous RPC routines (described in rpc_misc(3)) Destroys authentication information. Creates and returns an RPC authentication handle. Creates and returns an ONC RPC authentication handle that contains authentication information. Creates and returns an ONC RPC authentication handle that contains default authentication informa- tion. Retrieves the machine's IP address. Retrieves the network name of the caller. Converts from a domain-specific host name to an operating-system independent network name. Converts from an operating-system independent network name to a domain-specific host name. Converts from an operating-system independent network name to a domain-specific user ID. Returns a list of the current RPC program-to-port mappings on the host located at a specified IP address. Returns the port number on which waits a service that supports a specified program number and transport protocol. Instructs portmap on a remote host to make an RPC call. Maps a program to a port. Destroys the mapping of a program to a port. Registers a procedure with the RPC service package. Specifies an error value that is set by an RPC client creation routine. Converts from a domain-specific user name to an operating-system independent network name. Register transport handle with ser- vice. Unregister transport handle with service. RELATED INFORMATION
rpc_clnt(3), rpc_misc(3), rpc_svc(3), rpc_xdr(3), xdr(3) Remote Procedure Calls: Protocol Specification - RFC 1050 delim off rpc(3)
Man Page