How to send acknowledgement with TCP

Continuing the discussion from How to send acknowledgement in tcp:

We are having TCP listener (tcp in) with node RED. When TCP client device sends data to the node red, how can send acknowledgement (like REST response) to the client? Is there any methods available?

Use a TCP out node to send whatever response you need to.

image

image

Am i misunderstanding your requirement?

Thanks for the reply.

I am simulating TCP client and TCP server with 2 Node RED instances.
TCP Client:

[{"id":"f4ef0b95.8d83b8","type":"inject","z":"3b9021bc.3cd74e","name":"Node RED 01","props":[{"p":"payload"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"000000000000008c08010000013feb55ff74000f0ea850209a6900009400d6120000001e09010002000300040016014703f0001504c8000c0900730a00460b00501300464306d7440000b5000bb60007422e9f180000cd0386ce000107c700000000f10000601a46000001344800000bb84900000bb84a00000bb84c00000000024e0000000000000000cf00000000000000000100003fca","payloadType":"str","x":380,"y":100,"wires":[["43bf8d1a.3dc1d4"]]},{"id":"43bf8d1a.3dc1d4","type":"function","z":"3b9021bc.3cd74e","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":503,"y":100,"wires":[["84e19867.dda908"]],"l":false},{"id":"84e19867.dda908","type":"tcp out","z":"3b9021bc.3cd74e","host":"10.23.50.3","port":"1001","beserver":"client","base64":false,"end":false,"name":"","x":660,"y":100,"wires":[]}]

TCP Server:

[{"id":"9256fb27.499c88","type":"tcp in","z":"319467b8.0c7a48","name":"","server":"server","host":"localhost","port":"1001","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":130,"y":240,"wires":[["86c062cf.f3644","f67b71c4.fe1cd"]]},{"id":"f67b71c4.fe1cd","type":"function","z":"319467b8.0c7a48","name":"","func":"\nmsg.payload = 0;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":340,"y":320,"wires":[["710be7a3.43fe58","c0c5df38.ac211"]]},{"id":"c0c5df38.ac211","type":"debug","z":"319467b8.0c7a48","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":590,"y":240,"wires":[]},{"id":"710be7a3.43fe58","type":"tcp out","z":"319467b8.0c7a48","host":"","port":"","beserver":"reply","base64":false,"end":false,"name":"","x":600,"y":320,"wires":[]}]

I am trying to send Reply to TCP client from TCP Server. Is there any possibility to read the server response at TCP client instance?

Use a TCP request node on the client, then you'll get response.

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