Skip to content

Socket

WebSocket Connection Details

The 159.65.159.79:8082 Socket API allows for real-time communication using WebSocket technology. Below are the details and implementation methods for connecting to the socket.

Connection Details

  • Base URL: wss://159.65.159.79:8082/api/socket
  • Authentication: Requires a valid session cookie (JSESSION) for receiving relevant responses.

Implementation Methods

There are two ways to authenticate and use the socket:

1. Basic Authentication

  • Use your credentials to authenticate via Basic Auth.
  • After successful authentication, a session cookie (JSESSION) will be generated.
  • Use this cookie to establish the WebSocket connection.
  • If you already have a valid session cookie (JSESSION), you can directly use it to connect to the WebSocket.
  • Ensure the cookie is included in the request headers for the WebSocket handshake.

Example Workflow

  1. Generate Cookie Using Basic Auth:

  2. Send a request to the authentication endpoint with your credentials.

  3. Extract the JSESSION cookie from the response.

  4. Establish WebSocket Connection:

  5. Use the JSESSION cookie in the WebSocket handshake request.

  6. Connect to the WebSocket endpoint: wss://159.65.159.79:8082/api/socket.

By following this approach, you can seamlessly integrate with the 159.65.159.79:8082 Socket API for real-time communication.