Khaqan Ahmad F2018266239 Computer Network Section v5
Khaqan Ahmad F2018266239 Computer Network Section v5
F2018266239
Computer network
Section v5
------------------------------------------------------------------------------------------------
What is socket?
A socket is one endpoint of two way communication link between two
programs running on the network. A socket is bound to a port number
so that the Transmission Control Protocol layer can identify the
application that data is to sent to every Transmission Control Protocol
connection is uniquely identified by its two endpoints
What is socket programming?
Socket programming is a way of connecting two nodes on a network to
communicate with each other. One node listens on a particular port at
an IP while other node reaches out to the other to form a connection.
Server forms the listener socket while client reaches out to the server
Purpose :Socket programming shows how to use socket APIs to establish
communication links between remote and local processes. The
processes that use a socket can reside on the same system or different
systems on different networks. Sockets are useful for both stand-alone
and network applications.
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Client:
Client socket initiate a TCP connection to the server by creating a socket
object(Three way handshake).Specify the address of the server
process,namely,the IP address of the server and the port number of the
process.