Create a connectionless pair of sockets that can communicate with each other without specifying any addresses in their I/O operations

  1. Open SOCK_DGRAM socket srvr_s on srvr and bind it to srvr_addr address;

  2. Open SOCK_DGRAM socket clnt_s on clnt and bind it to to clnt_addr address;

  3. connect() clnt_s socket to srvr_s socket;

  4. connect() srvr_s socket to clnt_s socket.

Parameters:

srvr

PCO for server part of connection

clnt

PCO for client part of connection

domain

Domain used in the connection

proto

Protocol used in the connection

srvr_addr

server address (cannot be NULL) to be used as a template for bind() on server side and for connect() on client side.

clnt_addr

address to bind client to (cannot be NULL)

srvr_s

SOCK_DGRAM socket reside on srvr

clnt_s

SOCK_DGRAM socket reside on clnt