network programming and sockets service port number ftp-data ftp-control ssh telnet smtp (mailhttp (wwwpop imap https (secure www the process of establishing tcp connection involves precise sequence of steps on both the server and clientas shown in figure server client socket(socket(bind(listen(accept(wait for connection establish connection read(connect(request write(process request write(figure response read(tcp connection protocol for tcp serversthe socket object used to receive connections is not the same socket used to perform subsequent communication with the client in particularthe accept(system call returns new socket object that' actually used for the connection this allows server to manage connections from large number of clients simultaneously lib fl ff