# UDP multicast dynamic group and port

**URL:** <https://discourse.nodered.org/t/udp-multicast-dynamic-group-and-port/63938>\
**Category:** General\
**Created:** [14 June 2022 22:31 UTC](https://discourse.nodered.org/t/udp-multicast-dynamic-group-and-port/63938 "2022-06-14T22:31:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidz](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@davidz](https://discourse.nodered.org/u/davidz)\
**Post date:** [14 June 2022 22:31 UTC](https://discourse.nodered.org/t/udp-multicast-dynamic-group-and-port/63938/1 "2022-06-14T22:31:04Z")

</div>

For the UDP out node, the destination ip and port number can be set up dynamically in UDP message and broadcast message.

Is it possible to set up the group and port dynamically in multicast message? If the fields are left blank in multicast, Node-RED gives an error.

 ![udp multicast](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/a/0a4a2ef09dbb821d1eddfe2471403613879a569f.jpeg)

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [15 June 2022 09:15 UTC](https://discourse.nodered.org/t/udp-multicast-dynamic-group-and-port/63938/2 "2022-06-15T09:15:14Z")

</div>

Not currently no, as the node creates and binds the socket at deploy time and re-uses it for each message. It would need to be re-written to re-create the socket on each call.

---

<div class="post-metadata">

**Author:** ![davidz](https://avatars.discourse-cdn.com/v4/letter/d/a88e57/32.png) [@davidz](https://discourse.nodered.org/u/davidz)\
**Post date:** [15 June 2022 18:39 UTC](https://discourse.nodered.org/t/udp-multicast-dynamic-group-and-port/63938/3 "2022-06-15T18:39:41Z")

</div>

Thanks Dave!

---

<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:** [14 August 2022 18:40 UTC](https://discourse.nodered.org/t/udp-multicast-dynamic-group-and-port/63938/4 "2022-08-14T18:40:15Z")

</div>

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