Web Socket

  • For http protocol, it is about pulling, the client make pull request and then pull the response from the server through http protocol

  • Web socket protocol is established via http, it is bidirectional, the server can actively push the message to the client

  • Firstly, client initialize the connection with server to establish the channel in order to allow constant and continuous communication over TCP connection

  • A server can be connected with multiple clients

  • In the channel, the message sending will be bi-directional, client can send the message to the server, and the server can also send the message to client actively

  • From the inspector, it can be seen that the channel is established

  • In the channel, there are pull and push messages

Socket IO

  • It is a library that abstract web socket connections

  • It is required to install on both client and server-side

  • Provide convenience and make it easy to setup a channel

Last updated

Was this helpful?