Websocket in and out within the same connection

Hi!

I'm trying to connect Node-RED with OBS websocket. Without authentication this is pretty straigthforward but I'm stuck for the authentication.

According to OBS websocket documentation there are 3 steps. First, after the initial request from the client, the server send an Hello message. The client should respond with an Identify message and finally the server sends an Identified one.

So I have a websocket in node to catch the Hello message and a websocket out node to send the Identify one. But I see that opens 2 distincts connection so when I'm tring to send the Identify message, it opens a second connection, leading to another Hello message that is never catched.

Is it possible to have the in and out within the same connection?

Thanks

I did this once with a Ventuz Connection. For this it worked with two nodes: Websocket In, Websocket Out .
Then I switched them both to the same connection (no listen on!!).
In my case the connection was like this:

ws://127.0.0.1:20404/DirectorRemoting_Service/1.0/commands/ws/