Professional Documents
Culture Documents
Exp 6
Exp 6
Technology
Affiliated to Dr. A.P.J. Abdul Kalam Technical University, Lucknow, Uttar Pradesh Approved by
AICTE, New Delhi
Lucknow-Barabanki Highway, Safedabad, Barabanki (U.P.) - 225003 Website:
http://www.svn.ac.in
Experiment-6
Aim: Socket programming using UDP and TCP (e.g., simple DNS, data & time client/server, echo
client/server, iterative & concurrent servers)
Basics:
A socket connection is a 4-tuple -- (Host A, Port A, Host B, Port B) -- uniquely defining the connection.
Fig. no
alwaysPlease
shown in below the
correct it. fig.,
Computer Network Lab SVNIET, Barabanki
Page 1
Seth Vishambhar Nath Institute of Engineering &
Technology
Affiliated to Dr. A.P.J. Abdul Kalam Technical University, Lucknow, Uttar Pradesh Approved by
AICTE, New Delhi
Lucknow-Barabanki Highway, Safedabad, Barabanki (U.P.) - 225003 Website:
http://www.svn.ac.in
TCP client/server communication flow
Socket programming boils down to two systems communicating with one another. Generally, network
communication comes in two flavors: Transport Control Protocol (TCP) and User Datagram Protocol
(UDP). TCP and UDP are used for different purposes and both have unique constraints.
TCP is relatively simple and reliable protocol that enables a client to make a connection to a
server and the two systems to communicate. In TCP, each entity knows that its communication
payloads have been received.
UDP is a connectionless protocol and is good for scenarios where you do not necessarily
need every packet to arrive at its destination, such as media streaming.