Saptarshi's Notes 📝
  • HOME
  • Open-Source
    • Issue Template
    • Pull Request Template
    • Greetings Action
    • Stale Action
    • Push to Pull Requests Action
    • Contributing Guide
    • Security
  • Computer Networking
    • Introduction
    • IP Address
    • Data Transmission
      • Network Topologies
      • Structure of The Network
      • Network Devices
    • How does The Internet work?
      • OSI Model
      • TCP/IP Model
        • Application Layer
          • Application Layer Network Protocols
          • Sockets
          • Ports
        • Transport Layer
        • Network Layer
        • Data Link Layer
        • Physical Layer
Powered by GitBook
On this page

Was this helpful?

  1. Computer Networking
  2. How does The Internet work?
  3. TCP/IP Model
  4. Application Layer

Sockets

Socket is the interface between two processes for the purpose of communication. Each socket has a specific address. This address is composed of an IP address and a port number. Sockets are generally employed in client server applications.

Types of Sockets

There are two types of Sockets:

  1. Datagram Socket: This is a type of network which has connection less point for sending and receiving packets. It is similar to mailbox. The letters (data) posted into the box are collected and delivered (transmitted) to a letterbox (receiving socket).

  2. Stream Socket: In Computer operating system, a stream socket is type of inter-process communications socket or network socket which provides a connection-oriented, sequenced, and unique flow of data without record boundaries with well-defined mechanisms for creating and destroying connections and for detecting errors. It is similar to phone. A connection is established between the phones (two ends) and a conversation (transfer of data) takes place.

PreviousApplication Layer Network ProtocolsNextPorts

Last updated 2 days ago

Was this helpful?