Proposal to add recvBuf and sendTo to Network.Socket

Johan Tibell johan.tibell at
Wed Dec 29 18:39:37 CET 2010

On Wed, Dec 29, 2010 at 12:49 AM, Simon Horman <horms at> wrote:
> My proposed solution to this is to implement recvBuf.  For the sake of
> symmetry I think that it it would also make sense to add sendBuf, although
> I don't have any performance-based reasons for this.

I do intend to add recvBuf (perhaps as recvInto). I'm not so sure
about sendBuf as it can be implemented with almost no performance cost
by wrapping a ByteString constructor around a buffer.

> Before preparing patches - I have a crude one for testing that works -
> I would like to get an idea of if this change acceptable or not. And
> if so discuss which API calls might be appropriate to add.

I'd prefer if you just added Network.Socket.recvBuf for now, against
the current HEAD.


More information about the Libraries mailing list