svctcp_create -- Creates a TCP/IP-based RPC service transport.


#include <rpc/rpc.h>

SVCXPRT * svctcp_create(int sock, u_int send_buf_size, u_int recv_buf_size);


svctcp_create() cretes a TCP/IP-based RPC service transport, to which it returns a pointer. The transport is associated with the socket sock, which may be RPC_ANYSOCK, in which case a new socket is created. If the socket is not bound to a local TCP port, then this routine binds it to an arbitrary port. Upon completion, xprt->xp_sock is the transport's socket descriptor, and xprt->xp_port is the transport's port number. Since TCP-based RPC uses buffered I/O, users may specify the size of buffers; values of zero choose suitable defaults.

Return Value

svctcp_create() returns NULL if it fails, or a pointer to the RPC service transport otherwise.