I have a device that listens on a specific ip port (e.g. 30000).
I need to connect multiple times to that device, at least from two different tcp-request nodes. Typically when the device accepts the connection, it returns a work socket to the caller and goes back to listen for other connections on the original port (30000).
The problem is that I can't catch that port from tcp-request node and every time I want to send something I have to pass host and port. In this way I don't know what port to pass, because I can't get the work port.
Instead of using tcp-request, I understood I can use tcp-in and tcp-out, by storing the _session object. Thant could work, but tcp-in and tcp-out can't work with dynamic host:port.
So, I need either of the two:
- possibility to get and set _session or work port from tcp-request node
- possibility to dynamically set host and port in tcp-in / tcp-out
Can anybody help me ? (I don't have much time to tweak the source code and create a new node. I would need to learn everything from scratch... )