[Haskell-cafe] Re: Cleaner networking API - network-fancy
thomas.dubuisson at gmail.com
Thu Aug 13 14:09:38 EDT 2009
I'm considering putting not insignificant effort into reworking the
Network API during HacPDX. Assuming Johan agrees with the changes
(and I don't know exactly what those are yet), I'd like to leave
Network.Socket for general use and rework the Network module to allow
easier TCP/UDP sending and receiving, binding to particular IP
addresses, using bytestrings, receiving data with IP Headers, and
sending with IP headers. Multicast is another good idea that should
be in there.
In general, the community would probably benefit if all these small
packages (network, network-data, network-fancy, network-bytestring,
network-multicast, network-server) gave way to fewer, more complete
Right now the thought has came to me that the cleanest, most uniform
method might be to have a Config data type with all these ideas as
options and use a single 'connect', 'listen' or 'receive' function for
all the different protocols and their various options. I'll think on
On Thu, Aug 13, 2009 at 10:45 AM, Bardur Arantsson<spam at scientician.net> wrote:
> Taru Karttunen wrote:
>> network-fancy offers a cleaner API to networking facilities in
>> Haskell. It supports high-level operations on tcp, udp and unix
>> I would like some feedback on the API
>> In particular:
>> * Does the type of the server function in dgramServer make sense?
>> or would (packet -> Address -> (packet -> IO ()) -> IO ()) be
>> * Does the StringLike class make sense?
>> * Any other suggestions?
>> - Taru Karttunen
> One thing that seems to be missing (and also seems to be missing from the
> GHC standard libraries AFAICT) is listening for multicast UDP. This requires
> some extra socket gymnastics to handle group membership. The details can be
> found in the network-multicast package.
> /me who wonders where his signature went.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe