In this chapter we shall learn about:
1. Introduction
2. Different types of Sockets
3. Terms used in socket programming
Introduction:
In this chapter we shall learn about Linux Sockets.
Linux sockets is one of the IPC (Inter Process Communication) mechanism.
It will give 2 way communication between 2 processes, they can be one system or in different system.
Once the socket is established, data can be transfered in both the direction, till any one closes the connection.
Different types of Sockets:
There are 3 types of sockets:
1. Stream socket:
1. Also called as TCP, Transmission Control Protocol
2. They are reliable, sequenced.
3. Socket type is SOCK_STREAM
4. Connection oriented.
5. They are used in persistent connection and with large data capacity.
2. Datagarm Socket:
1. Also called as UDP, User Datagram Protocol
2. out of order, duplicates possible
3. No acknowledgements
4. No retransmissions
5. connectionless
6. Socket type is SOCK_DGRAM
3. Raw Socket:
provides access to the underlying communication protocols.
For every socket programming, there will be 2 entities.
Terms used in socket programming: