[Haskell-cafe] Re: Cleaner networking API - network-fancy

Thomas DuBuisson 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:
>> Hello
>> network-fancy offers a cleaner API to networking facilities in
>> Haskell. It supports high-level operations on tcp, udp and unix
>> sockets.
>> I would like some feedback on the API
>> http://hackage.haskell.org/packages/archive/network-fancy/0.1.4/doc/html/Network-Fancy.html
>> In particular:
>> * Does the type of the server function in dgramServer make sense?
>>  or would (packet -> Address -> (packet -> IO ()) -> IO ()) be
>>  better?
>> * 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.
> Cheers,
> --
> /me who wonders where his signature went.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list