daniestevez / dvb-gse

Rust implementation of DVB-GSE
Apache License 2.0
17 stars 3 forks source link

cli: use SO_REUSEADDR with multicast addresses #15

Closed daniestevez closed 1 year ago

daniestevez commented 1 year ago

This sets the SO_REUSEADDR socket option when the address is a multicast address.

This feature has been requested in #7.


@F5OEO I've checked with strace that this calls

setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0

Can you check if this allows sharing the multicast address and port in your intended use case?

daniestevez commented 1 year ago

Force-pushing because I've realized that we can have the libc crate as an optional dependency, because it's only needed for the cli feature.

daniestevez commented 1 year ago

@F5OEO did you have a chance to test this pull request, or should I merge it right away? I tested it and saw that it doesn't break anything, so it is probably safe to merge. Worst case this doesn't completely solve the multicast use case and something more is needed.

daniestevez commented 1 year ago

Merging, since this has been sitting for a while already.