Skip to main content

Configuring socketIO request

In Firecamp, you can configure advance message requests to test the websocket API. You can test multiple live connections, headers, and query params.

Prerequisites#

Enter the server endpoint, emit and listen to the events.

In this article, you'll learn to use advanced features of SocketIO like,

  1. Multiple Connections
  2. Config
  3. Persistent Config
  4. Header
  5. Query param
  6. Auth

Navigate to the Connections tab below the URL bar.

1. Connections#

Establishing multiple connections#

Firecamp offers functionality where you can connect your socketio server with multiple virtual clients and connections. You can either send a message to one or all. Below is the direction to understand how to create multiple clients and configure headers and query params.

Bydefault the Default connection added.

Direction#

Add new connection#

  1. Go to Connections in the message playground. Click the + New Connection
  2. Add connection name.
  3. You can view all the current connections in the connection dropdown beside the + New connection and from the URL bar beside the save button.

Switching between connection#

  1. You can either change the connection from the connection dropdown or the URL bar in the middle dropdown before the save button.

Broadcasting events#

  1. Add the number of connections you'd like to send to message to. For example, Adam, Bob and Luci When you'll add the name, you can see at the response panel, all the added connection name tabs will appear. All the events sending to the particular connection will appear under the appropriate name.
  2. Assume, you would like to send the message to Bob.
  • Goto Emitters tab.
  • Select the Bob from the connection dropdown before sending the button (green play icon)
  • Write the appropriate message and click the Send button.
  1. Navigate to the response panel and click the Bob tab. You can view all the messages over here. Follow the same procedure to send the message to the rest of the connection.

2. Config#

  1. Click the Config inside the Connections tab.
  2. In Firecamp you can find multiple options to configure WS connection. Following is the list of options with a specific purpose.

    The Config will apply to the connections level only.

#OptionsDescription
1.ForcenewDesc
2.NamespaceDesc
3.PathDesc
4.PingDesc
1.Ping intervalDesc
1.TransportsDesc

3.Persistent config#

Right below the config option, you can see the Persistent config, this is the request level configurations options.

#OptionsDescription
1.Reject unauthorizedDesc
2.TimeoutDesc
3.ReconnectionDesc
4.Reconnection attemptsDesc
1.Reconnection delayDesc
1.Reconnection delay maxDesc

3. Headers#

By default in Firecamp, there is Sec-WebSocket-Extensions, Sec-WebSocket-Protocol and Sec-WebSocket-Version You add custom headers with Key and Value

4. Query params#

You can pass the query params in request by adding the value of Key and Value

5. Auth#

Auth is only supported the >= SocketIO v3 To pass the auth, please change your socketio version from the URL bar. Now you can pass the auth in request by adding key and Value