Request Payload

socket=io(
  "---web socket url---",
{
  transports: [
    "websocket",
    "polling"
  ],
  auth: {
    Authorization: "Socket Authorization Key",
    
  },
  autoConnect: true,
  
});

Authorization Token

  • Name: Authorization

  • Type: String (Required)

  • Description: Authentication token for the user.

Transports

The socket server supports multiple transports for real-time communication. The server will choose the best available transport method based on the client's capabilities.

  • WebSocket: Uses the WebSocket protocol for real-time communication. Preferred transport if supported by the client.

  • Polling: Uses long-polling for real-time communication. Used as a fallback for clients that do not support WebSocket.

Last updated