-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
original input msg obj gets lost #1
Comments
Please update with information on what you try to do. If possible add an example showing the faulty behaviour. |
The tcp node creates a new msg object, instead of changing the payload. Therefore all other information like "_linksource" are getting lost. Put the tcp node between link_in and link_out nodes (to create a function) to see the behaviour. I stored this manually in the screenshot below. |
I see your point. In different applications, servers might emit data sporadically or may not respond in a timely manner, or will automacially emit a lot of data without any data from the client. This necessitates a TCP client design that can gracefully handle such variability. This includes the ability to manage data that arrives without a direct request as well as requests not resulting in any data. To accommodate these diverse situations it will not be possible to always justs anhance the message object with payload. To do this we could pursue a strategy that involves storing incoming message objects upon receipt. Should the server provide a response, the system update the payload of the stored message object, rather than creating a new one. If multiple messages are emitted, the same applies for all messages. Of course this behaviour must be configurable since it could have unwanted side effects. Client-Server Data Receipt:
Server Data Emission:
|
I see your point too ;-) I was used to this behaviour of the standard TCP request node, so it would be nice to have this feature implemented. But I think I´ve found the code of the built in tcp node (especially line 646 and following): |
The original input msg object with all other information (for example return node information) is getting lost.
The better way would be to update msg.payload and keep the other information.
The text was updated successfully, but these errors were encountered: