Proposal: ByteString based datagram communication (Ticket #1238 )

Robert Marlow rob at mits.coop
Tue Mar 20 20:04:34 EDT 2007


I had a quick look through but other than some DNS support in HAppS,
could only see support for Stream based (TCP) communication. The DNS
code is done through Network.Socket rather than providing a higher-level
interface similar to what is available for Stream communication in
Network as I've tried to provide in this patch. My hope is that my patch
allows things such as DNS to be implemented more easily and uses lazy
ByteStrings to allow easy integration with the Binary package.

Using ByteStreams for Stream based communication with the existing
Network library seems fairly trivial. My concern is that there is no
support for Datagrams (especially UDP), and the functions named in a way
that would imply packet-based communication such as Datagrams to most
network people (sendTo and recvFrom) are instead throw away TCP
utilities not intended for "real work".


On Wed, 2007-03-21 at 09:44 +1100, Donald Bruce Stewart wrote:
> rob:
> > I've made a proposal to add ByteString based datagram communication to
> > Network.Socket and Network. Details are at:
> > 
> > http://hackage.haskell.org/trac/ghc/ticket/1238#preview
> > 
> > I rushed to get this done before I go on a trip tomorrow so I haven't
> > completed testing and won't be available to discuss it for the next 9
> > days. As such, if discussion is needed, an extended deadline would be
> > appreciated.
> > 
> > Testing windows is a bit awkward for me since I don't have a windows
> > machine, so if anyone can test that platform I'd be very appreciative.
> > I'll try to work through the problems I was having with hugs and test
> > when I get back unless someone else wants to test it first.
> > 
> > Thanks.
> 
> I'd quickly note that you might also want to check the bytestring level
> stuff in HAppS/network-alt and in HaskellNet.
> 
> -- Don
> 
-- 
Robert Marlow
MITS Co-operative Limited
http://www.mits.coop/




More information about the Libraries mailing list