Is it possible to disconnect a TCP Request Node that has been configured with "never - keep connection open"?
I'm trying to connect on-demand to a remote client and transfer / receive data within that session, then finally disconnect once finished.
Looking at the source for the TCP Request Node it looks like I can set the node with "never - keep connection open" and it then looks like I can connect on-demand, send a message and receive an initial reply, then poke the input again on the TCP Request Node to carry on the conversation back and forth as needed on the existing connection.
Is my understanding of that correct?
What I seem to be missing though is a way to disconnect when finished?
If you are trying to do something "LIKE" a telnet session the answer is "Yes". You can carry on a back and forth "session" say of ascii text commands and responses will be offered on receive.
The issue I have thus far is that I cannot seem to find the right combination of messages and such to dynamically set the IP addres, the port and the "open status". I prefer to keep the connection open at all times, and it seems that if one sets the IP address and port by using msg.host and msg.port, it will NOT stay open even if the node is configured that way. It is a real short-coming to NOT be able to open a socket with dynamically derived parameters (global context for instance), and then have the socket stay open.
I have seen a flow that forced a TCP request node disconnect by sending it an invalid TCP port along with the IP address. That seemed to work ok when I tested it with an inject node.