Repository navigation
missing multicast support #381
Description
Activity
We are trying to make
networktruely cross-platform and keep it as small as possible. So, we should answer the following questions for this kind of issues:- Is the code truely cross-platoform? If no, we cannot merge the code into
network. - Is it impossible to implement the code without modifications of
network? If the answer is possible, suchnetwork-xxxpackags are our intention.
- Is the code truely cross-platoform? If no, we cannot merge the code into
@kazu-yamamoto This might point to a deficiency in documentation. Just as we point to high level libraries in
network's description, we may want to point to the existence of anetwork-xxxecosystem.I agree on the arguments. However, there is still room for improvement. The
network-multicasthas 2 parts:- High level functions
multicastSenderandmulticastReceiver. - Low level socket manipulation functions (setting socket options with some multicast specific constants).
Only the low level part is a candidate for the
networkbase library. I am almost certain that it can remain cross-platform. On the other hand, anetwork-multicastcan still provide added value, but without digging low level.network-multicastsource code is very short. Please have a look at the low level part and see how/if it could be translated to the base library.- High level functions
We should read https://tools.ietf.org/html/rfc3678.
Unfortunately, the support is not straightforward becausesetSocketOptionallows anIntvalue only.
We need a more generic API.When #445 is merged, we have the generic API.
Not correct.
masteralready hasgetSockOptandsetSockOpt!I've add cross-platform multicast support via
setSockOpt. IPv4 only for now
#614 (comment)
Please consider adding UDP multicast support to the network library.
There is a separate library
network-multicasthere:https://hackage.haskell.org/package/network-multicast
but the multicast is so basic function that it could as well be integral part of the
network.