z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Streamline data transfer using connect call

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

While you can use the connect() call on a datagram socket, it does not act for a datagram socket as it acts for a stream socket.

On a connect() call, you specify the remote socket address with which you want to exchange datagrams. This serves the following purposes:

  • On succeeding calls to send datagrams, you can use the send() call without specifying a destination socket address; the datagram is sent to the socket address you specified on the connnect() call.
  • On succeeding calls to receive datagrams, only datagrams that originate from the socket address specified on the connect() call are passed to your program from the UDP protocol layer.
Note: A connect() call for a datagram socket does not establish a connection. No data is exchanged over the IP network as the result of the connect() call. The functions performed are local, and control is returned immediately to your application.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014