0% found this document useful (0 votes)
26 views

Khaqan Ahmad F2018266239 Computer Network Section v5

Sockets allow for two-way communication between programs running on a network by binding a port number so the TCP layer can identify the target application, with socket programming establishing connections between nodes to transmit data; user datagram protocol uses unconnected sockets without reliability while transmission control protocol provides connected sockets with reliability and streaming through acknowledgements and retransmissions. A socket server waits for client connections on an initial contact port and dedicates a new socket to each client, while a client initiates a TCP connection through a 3-way handshake by creating a socket specifying the server's IP address and process port number.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Khaqan Ahmad F2018266239 Computer Network Section v5

Sockets allow for two-way communication between programs running on a network by binding a port number so the TCP layer can identify the target application, with socket programming establishing connections between nodes to transmit data; user datagram protocol uses unconnected sockets without reliability while transmission control protocol provides connected sockets with reliability and streaming through acknowledgements and retransmissions. A socket server waits for client connections on an initial contact port and dedicates a new socket to each client, while a client initiates a TCP connection through a 3-way handshake by creating a socket specifying the server's IP address and process port number.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Khaqan ahmad

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.

------------------------------------------------------------------------------------------------

Discuss about the socket programming with UDP and TCP?


User Datagram Protocol (UDP):
UDP is a simple transport-layer protocol. The application writes a
message to a UDP socket, which is then encapsulated in a UDP
datagram, which is further encapsulated in an IP datagram, which is sent
to the destination.There is no guarantee to delivery message .
Datagrams arrive only once.The UDP is its lack of reliability  if a datagram
reaches its final destination but the check sum detects an error and Each
UDP datagram is characterized by a length. The length of a datagram is
passed to the receiving application with the data.No connection is
established between the client and the server .it is also know as
connection less.
Transmission Control Protocol (TCP):
TCP provides a connection oriented services . it is based on connections
between clients and servers.
TCP provides reliability and stream based . When a TCP client send data
to the server, it requires an acknowledgement in return. If an
acknowledgement is not received, TCP automatically retransmite the
data and waits for a longer period of time.There is guarantee to delivery
message.TCP is a byte-stream protocol, without any boundaries at all.

------------------------------------------------------------------------------------------------

how to build the client server that cummunicate with socket?


Server:
Welcomes socket some initial contact from client .connection socket is
create at initial contact of client .new socket that is dedicated to the
particular client.

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.

You might also like