[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 1


svctcp_create Subroutine

Purpose

Creates a Transmission Control Protocol/Internet Protocol (TCP/IP) service transport handle.

Library

C Library (libc.a)

Syntax

#include <rpc/rpc.h>


SVCXPRT *svctcp_create ( sock, sendsz, recvsz)
int sock;
u_int sendsz, rcvcsz;

Description

The svctcp_create subroutine creates a Remote Procedure Call (RPC) service transport handle based on TCP/IP and returns a pointer to it.

Since TCP/IP remote procedure calls use buffered I/O, users can set the size of the send and receive buffers with the sendsz and recvsz parameters, respectively. If the size of either buffer is set to a value of 0, the svctcp_create subroutine picks suitable default values.

Parameters


sock Specifies the socket associated with the transport. If the value of the sock parameter is RPC_ANYSOCK, the svctcp_create subroutine creates a new socket. The service transport handle socket number is set to xprt->xp_sock. If the socket is not bound to a local TCP/IP port, then this routine binds the socket to an arbitrary port. Its port number is set to xprt->xp_port.
sendsz Specifies the size of the send buffer.
recvsz Specifies the size of the receive buffer.

Return Values

Upon successful completion, this subroutine returns a valid RPC service transport handle. If unsuccessful, it returns a value of null.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The registerrpc subroutine, svcudp_create subroutine.

List of RPC Programming References.

TCP/IP Protocols in AIX 5L Version 5.1 System Management Guide: Communications and Networks.

Remote Procedure Call (RPC) Overview for Programming in AIX 5L Version 5.1 Communications Programming Concepts.

Sockets Overview in AIX 5L Version 5.1 Communications Programming Concepts.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]