Open mzpqnxow opened 1 year ago
This isn't a bug, it's just a placeholder to explain a PR
Very much appreciated!
I wasn't aware broadcast is still used anywhere (really IPv4 support is an afterthought here), but if there's a simple fix, then by all means let's fix this :-)
This isn't a bug, it's just a placeholder to explain a PR
Very much appreciated!
I wasn't aware broadcast is still used anywhere (really IPv4 support is an afterthought here), but if there's a simple fix, then by all means let's fix this :-)
I was surprised as well, especially because the product I encountered seems to have adopted multicast for almost everything else. shrug
Thanks for being open to contributions. I don't usually mind maintaining a fork with minor changes, but it's obviously a little less hassle from my life when things are merged upstream
This isn't a bug, it's just a placeholder to explain a PR
I recently had the need to use broadcast (not multicast) to integrate with software I did not write, that performs discover on across a layer-2 network. Though
aiocoap
has support for multicast, there's no support for broadcast, as is evidenced here:The
EPERM
is misleading, though not the fault of Python oraiocoap
; this is what various socket system calls return when used with a broadcast address but without having explicitly usedsetsockopt()
to set theSO_BROADCAST
bit to 1 on the socketI won't try to argue that the software I'm interfacing with made the right decision in using broadcast rather than multicast. I'm very new to COAP and have not read any of the RFCs so pardon me if this violates the RFC. It wasn't my idea, I'm just stuck with it :)
I'm sending a PR in a few moments that does the bare minimum to make
aiocoap-client
interact happily when the COAP endpoint is a broadcast address. I tried to be as "light-touch" as possibleEnvironment
I don't think this is really necessary in this case, but can't hurt:
OS:
Python and
aiocoap
versions / build-time libraries/supported transports