VMS Help
TCPIP Services, Programming Interfaces, RPC XDR Routines, xdrrec_create
*Conan The Librarian (sorry for the slow response - running on an old VAX)
|
|
Initializes a record-oriented XDR stream descriptor.
Format
#include <tcpip$rpcxdr.h>
void xdrrec_create(XDR *xdrs, u_int sendsize, u_int recvsize,
char *tcp_handle, int (*readit)(), int (*writeit)());
xdrs
A pointer to the XDR stream handle being created. The routine
xdrrec_create fills in xdrs with encoding and decoding
information.
sendsize
The send buffer size.
recvsize
The receive buffer size.
tcp_handle
A pointer to an opaque handle that is passed as the first
parameter to the procedures (*readit)() and (*writeit)().
(*readit)()
Read procedure that takes the opaque handle tcp_handle. The
routine must use the following format:
int readit(char *tcp_handle, char *buffer, u_long len)
where tcp_handle is the client or server handle, buffer is the
buffer to fill, and len is the number of bytes to read. The
readit routine should return either the number of bytes read
or the value -1 if an error occurs.
(*writeit)()
Write procedure that takes the opaque handle tcp_handle. The
routine must use the following format:
int writeit(char *tcp_handle, char *buffer, u_long len)
where tcp_handle is the client or server handle, buffer is the
buffer to write, and len is the number of bytes to write. The
readit routine should return either the number of bytes written
or the value -1 if an error occurs.
The stream descriptor for xdrs initializes the maximum allowable
size for a request recvsize and reply sendsize, the addresses of
the routine to perform the read (readit) and write (writeit), and
the TCP handle used for network I/O.
None
[legal]
[privacy]
[GNU]
[policy]
[netiquette]
[sponsors]
[FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.