Socket Programming
Socket Programming
The role of socket programming in communicating between systems and contrast the protocols and
uses of TCP/IP sockets and Datagram sockets. A socket is one of the most fundamental technologies of
computer networking. Sockets allow applications to communicate using standard mechanisms built into
network hardware and operating systems.
Stream sockets provide a bidirectional, reliable, sequenced, and unduplicated flow of message
data.
Datagram sockets support bidirectional data flow, but don't guarantee that the message data
is sequenced, reliable, or unduplicated.
Raw sockets give you access to the underlying communication protocols that support socket
abstractions.
In a nutshell, a socket represents a single connection between exactly two pieces of software. A socket
provides a bidirectional communication endpoint for sending and receiving data with another socket.
Socket connections normally run between two different computers on a LAN or across the Internet, but
they can also be used for inter process communication on a single computer.
Web browsers, instant messaging applications, peer to peer file sharing systems.
Contrast the protocols and uses of TCP/IP sockets and Datagram sockets
TCP is connection oriented – once a connection is established, data can be sent bidirectional. UDP is a
simpler, connectionless Internet protocol. Multiple messages are sent as packets in chunks using UDP