<div class="gmail_quote">On Mon, Aug 24, 2009 at 12:48 PM, Johan Tibell <span dir="ltr"><<a href="mailto:johan.tibell@gmail.com">johan.tibell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
My plan for network-bytestring has always been to offer a<br>
Network.Socket.Buffer with function such as 'recvInto' that work on<br>
buffers. The higher level bytestring interface can then be implemented<br>
in terms of this interface.<br>
</blockquote><div><br>How would a Buffer differ from a combination of Ptr a and CSize? (My implied argument is that it shouldn't.)<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've been struggling a bit with how to expose less frequently used<br>
functionality in the BSD socket API such as the 'flags' parameter to<br>
'send'. It feels a bit unfortunate to have to pass a "no flags" value<br>
in the most frequent case. Optional keyword parameters would be useful<br>
here.<br>
<div class="im"></div></blockquote><div><br>send vs sendWithFlags would be workable, since we're not going to get keyword or optional arguments in a happy-making form in the language any time soon. Of course, just making people use defaultFlags (as getAddrInfo does) isn't too awful, either.<br>
</div></div>