Trouble getting to OF server

I’m using ofxHTTP and ofxJSONRPC to stream a video and some data packed in a Json file:

ofxHTTP::SimpleIPVideoServer videoServer port 3333

ofx::HTTP::JSONRPCServer jsonServer port 3333

Both servers are initialized in the same port, and on setup. Then, on the client side, when the address is then entered, sometimes the video is not shown or the data is not read. And from 10 tries, just a couple of them the client is connected to both of them.
Testing server on a Raspberry Pi 4.

The error on the browser console for the data is:

jquery.jsonrpcclient.js:225 WebSocket connection to 'ws://' failed: Error during WebSocket handshake: Unexpected response code: 200

| --- | --- | --- | --- |

While the one for the video is: GET net::ERR_CONTENT_LENGTH_MISMATCH 200 (OK)

When starting a single server, the client connection rate is 100% for both, so the main question is:

It’s possible to used both servers on the same port?

Or the server needs to be configured in a special way? I mean inside the addons?

Thanks in advance.

it is not possible to have multiple apps listening on the same port, on the same machine/network interface. you will have to use different ports.
Just make sure you dont pick one of the commonly used ones,
hope that helps

Hei! Thanks for the quick answer.
There’s only one OF app running with 1 SimpleIPVideoServer and 1 ofxJSONRPC (on the same port), do you mean that this also it’s no possible?

I have little experience with websockets and servers so these questions maybe very basic.

I’m checking the ports on the chart, thanks again.

yes, each connection has to use a different port.