Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
BIND z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference SC27-3660-00 |
|||||||||||||||||
In a typical server program, the BIND call follows a SOCKET call and completes the process of creating a new socket. The BIND socket command can specify the port or let the system choose the port. A listener program should always bind to the same well-known port so that clients know the socket address to use when issuing a CONNECT, SENDTO, or SENDMSG request. In addition to the port, the application also specifies an IP address on the BIND socket command. Most applications typically specify a value of 0 for the IP address, which allows these applications to accept new TCP connections or receive UDP datagrams that arrive over any of the network interfaces of the local host. This enables client applications to contact the application using any of the IP addresses associated with the local host. Alternatively, an application can indicate that it is interested in receiving new TCP connections or UDP datagrams that are targeted towards only a specific IP address associated with the local host. This can be accomplished by specifying the IP address in the appropriate field of the socket address structure passed on the NAME parameter. Tip: Even if an application specifies the value
0 for the IP address on the BIND, the system administrator can override
that value by specifying the BIND parameter on the PORT reservation
statement in the TCP/IP profile. The effect of this override is similar
to the effect of the application specifying an explicit IP address
on the BIND macro. For more information, see z/OS Communications Server: IP Configuration
Reference.
The following requirements apply to this call:
Figure 1 shows an example of BIND call instructions. Figure 1. BIND call instruction
example
For equivalent PL/I and assembler language declarations, see Converting parameter descriptions. |
Copyright IBM Corporation 1990, 2014
|