Quick Introduction to WEBSOCKET SERVER

Intro : 
This article will lead you to how WebSockets works and what problems it solves with the help of its functionalities. 
  • WebSocket was first identified by HTML5 as TCP Connection In June 2008. 
  • Google Chrome was the first browser to fully support WebSockets.
  • WebSocket requests are not restricted by the Same-origin policy
  • To avoid Cross-Site WebSocket Hijacking attacks WebSocket servers must validate the "Origin" header against the expected origins during connection establishment.
  • WebSocket provides a persistent connection between the client and the server so you can communicate between client and server at any time, you can also pass messages to each other.


WebSockets is used to build a real-time application without using long polling. In simple terms, WebSocket is a way to bidirectionally communicate between server and client without page refresh or sending ajax requests.



This facility provides a persistent connection between a client and a server. so you can send or receive data over an HTTP through a single TCP/IP socket connection.

if you need some data from the server and you don't want to reload the page or do not want to poll ajax requests then you need to implement a WebSocket SERVER in your project.

Here are some widely used web-socket libraries:
  • Socket.io.
  • WS.
  • Sockjs.
  • Websocket Node.
  • Socket cluster.
  • Feathers.
  • Faye-web socket-node.
  • Web socket as promised.















Comments