What is a web socket when there is a bidirectional connection? Can the server communicate with the application and the application with the server?

  • one
    If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

In accordance with the client-server architecture, the connection is always initiated by the client. The connection to the WebSocket server is initially established via the HTTP protocol, after which the connection is updated to the WebSocket protocol. After the connection is established, it can be used by any of the parties for both sending and receiving messages. That is, any party can send messages at any time via a pre-established WebSocket connection.

  • And in mobile applications will function normally? If we assume 10,000 users will be at the same time and the server will be one? - user197889
  • 2
    @Peter: There is nothing in the WebSocket technology itself that prevents 10,000 clients from connecting and working simultaneously. Pull or not in practice depends entirely on the implementation of the server. - cridnirk