Response to tcp subscription?


I use aTCP-IN NODE to listen for a client at port 8250.

If the client connects it sends me a subscription message
with this message i get session-id, ip and port of the connection:

CasparCG Client : msg : Object
object
topic: "CasparCG Client"
payload: string
      SUBSCRIBE firstRD localhost:1880
ip: "::1"
port: 52170
_session: object
      type: "tcp"
      id: "3f457f08.b96ca"
_msgid: "9629e67a.355d28"

Now I want to start sending my own messages to the connection as a response. Therefor I use the TCP-OUT NODE with "Reply To TCP" activated. But where should I inject my message and should I use the session-id to address the client? If so, is the port then set automatically? I don't get it to work.

example:


[{"id":"1224d6b.ceffb29","type":"tab","label":"","disabled":false,"info":""},{"id":"6cc99649.7395c8","type":"tcp in","z":"1224d6b.ceffb29","name":"","server":"server","host":"","port":"8250","datamode":"stream","datatype":"buffer","newline":"","topic":"TCP Client","base64":false,"x":140,"y":200,"wires":[["89672f27.2a1fc"]]},{"id":"89672f27.2a1fc","type":"template","z":"1224d6b.ceffb29","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"{{payload}}","output":"str","x":440,"y":200,"wires":[["c59737c8.1ef9c8","ffd6be18.512a2"]]},{"id":"c59737c8.1ef9c8","type":"debug","z":"1224d6b.ceffb29","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":870,"y":340,"wires":[]},{"id":"ffd6be18.512a2","type":"tcp out","z":"1224d6b.ceffb29","host":"","port":"","beserver":"reply","base64":false,"end":false,"name":"","x":780,"y":200,"wires":[]}]

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