socket - socket io - python socket - sockets tutorial - java socket - socks proxy - socket programming



What is socket programming?

  • Socket programming is a way of connecting two nodes on a network to communicate with each other.
  • One socket(node) listens on a particular port at an IP, while other socket reaches out to the other to form a connection. Server forms the listener socket while client reaches out to the server.

Socket pair

  • Specified the two end points that uniquely identifies each TCP connection in an internet.
  • 4-tuple: (client IP address, client port number, server IP address, server port number)

Client-server Applications

  • Implementation of a protocol standard defined in an RFC. (FTP, HTTP, SMTP…)
    • Conform to the rules dictated by the RFC.
    • Should use the port number associated with the protocol.
  • Proprietary client-server application.
    • A single developer( or team) creates both client and server program.
    • The developer has complete control.
    • Must be careful not to use one of the well-known port number defined in the RFCs.

Getting started with socket :

Python TCP socket simple server and client examples with annotation :

  • Sample client program with socket
  • Sample server program with socket

C++ socket :

Socket io :

Getting started with Socket io :

Handling users with Socket io :

Listen to Events :

Broadcast :

Fire Events :

WebSockets:

Getting started with WebSockets :

Differences between WebSockets and AJAX :


Related Searches to Socket Tutorial