Skip to content
Sahithyan's S3
1
Sahithyan's S3 — Data Communication and Networking

Sockets

A software endpoint used by applications for network communication. IP address + transport layer port number + protocol (TCP or UDP) defines a socket. Provides an interface between application and transport layers.

All ports below 1024 are reserved for well-known services by IANA.

Aka. RPC. Procedure call over a network:

  • Client stub marshals parameters
  • Server stub unmarshals and executes
  • Uses XDR to handle different architectures (endianness)

Failure cases more complex than local calls.

Used for reliable, connection-oriented communication.

Properties:

  • Establish a connection (3-way handshake)
  • Ordered delivery
  • No loss (retransmissions)
  • No duplication
  • Error detection
  • Flow control, congestion control

Used by HTTP(S), SSH, SMTP, etc.

Connectionless, faster, but unreliable, unordered. Has no congestion control

Used by DNS, VoIP, video streaming, Online gaming.