Algorithm of creating a client socket of type

SOCK_STREAM

  1. Call socket() on clnt PCO with the following parameters: domain, SOCK_STREAM, proto. Created socket is referred as clnt_s below.

  2. If clnt_addr is not equal to NULL, bind() clnt_s socket to clnt_addr address.