hhromic / e131-node

Node.js client/server library for the E1.31 (sACN) protocol
Apache License 2.0
28 stars 12 forks source link

Max limit of 20 Universes as a E131 Server #17

Closed afontaine-chipkin closed 1 year ago

afontaine-chipkin commented 3 years ago

When creating a new server using the e131.Server function and passing in an array of more than 20 universes, the application crashes with the following error:

Error: addMembership ENOBUFS
    at Socket.addMembership (dgram.js:830:11)
    at X:/dev/node_modules/e131/lib/server.js:74:20
    at Array.forEach (<anonymous>)
    at Socket.onListening (X:/dev/node_modules/e131/lib/server.js:71:20)
    at Socket.onListening (dgram.js:225:10)
    at Socket.emit (events.js:326:22)
    at Socket.EventEmitter.emit (domain.js:506:15)
    at startListening (dgram.js:150:10)
    at dgram.js:345:7
    at processTicksAndRejections (internal/process/task_queues.js:85:21)

Trying to research around the internet, I eventually found the following article: https://www.ibm.com/docs/en/zos/2.1.0?topic=options-ip-add-membership-ip-drop-membership

The article specifies the following: "However, there is a maximum limit of 20 groups for a single UDP socket, and there is a maximum limit of 256 groups for a single RAW socket"

Since this library uses a UDP socket, there is a max limit of 20 universes per socket.

hhromic commented 1 year ago

Hi @afontaine-chipkin , thanks for the investigation and clarificaiton. I now added a note in the README in 093f62d26f4c6f055d8edd62812abf9c5da2d57b regarding this limitation linking to this issue 👍.