Setting up a tcp socket on specific port

Hi,

I have a server which emits continuous messages on port xx. I have made a python program to listen and list all messages coming from that server, though a tcp socket (AF_INET).
How can I make the same on node-red? I have tried with the tcp-request node, but it is showing a message only if triggered, and doe snot "keep" alive listening on that server/port.

Hi @fmarzocca ! Have you tried using the TCP In node instead of the TCP request?

Yes, but it does not connect to the TCP socket.
The TCP IN does not have a field to input the server's IP.

And in the TCP request I imagine you tried setting the return option to: never keep connection open ?

Yes, I did. Sorry not to have been so much verbose, but I am currently out of my main desk.
I'm afraid I should write my own node to handle handshaking with that socket.

If you know each message sent by this server is separated by a special character, you can set it to: "when character received is" for example: \n

Yes, that could be an idea. I will try, thank you!

Have you tried the TCP in node set to connect to?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.