# Node.send direct/broadcast to LinkIn type of receiver instead of port out

**URL:** https://discourse.nodered.org/t/node-send-direct-broadcast-to-linkin-type-of-receiver-instead-of-port-out/40786
**Category:** Developing Nodes
**Created:** [10 February 2021 22:14 UTC](https://discourse.nodered.org/t/node-send-direct-broadcast-to-linkin-type-of-receiver-instead-of-port-out/40786 "2021-02-10T22:14:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![justin](https://avatars.discourse-cdn.com/v4/letter/j/3ab097/32.png) [@justin](https://discourse.nodered.org/u/justin)
#### Post date: [10 February 2021 22:14 UTC](https://discourse.nodered.org/t/node-send-direct-broadcast-to-linkin-type-of-receiver-instead-of-port-out/40786/1 "2021-02-10T22:14:49Z")

</div>

Is it possible to pass a callback into a node that redirects the port out to another node (like a IinkIn event receiver)? I don't mean create a LinkOut that takes the message from the node, or a switch that routes it explicitly. I am wondering if you can dynamically pass the callback into the node via the message to include the routing within the nodes input event?

```auto
     n.on("input", msg => {
           msg.payload = doABunchOfWork();

           // instead of this
           n.send(msg); // <- which just ports out 

           // something like 
           n.send(msg.targetsOrReceiver, msg); // <- not likely the method but ideally the idea is it doesn't just port out rather it emulates the link In-Out broadcast/receiver functionality
     });

```

Thanks,  
Justin

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [11 April 2021 22:15 UTC](https://discourse.nodered.org/t/node-send-direct-broadcast-to-linkin-type-of-receiver-instead-of-port-out/40786/2 "2021-04-11T22:15:29Z")

</div>

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