On Wed, Nov 3, 2010 at 19:26, Marc Lehmann <[email protected]> wrote:
> On Tue, Nov 02, 2010 at 02:14:42PM -0600, AJ ONeal <[email protected]> wrote:
>> *send()* and *recv()*. Well, in short, I was being lazy. See, by using these
>> system calls, I don't have to enter the *flags* argument that *send()* and *
>> recv()* use, and I always set it to zero anyway. Of course, socket
>
> Not only that, it means your code will be much more generic (it works with
> non-sockets for example).
>
> However, recv has the (nonportable) advantage of the MSG_DONTWAIT option
> on many operating systems, which allows one to avoid changing fd flags on
> shared fds, while send might have MSG_NOSIGNAL to avoid SIGPIPE, which cna
> also be a nuisance.
>
> Having said that, I always prefer read/write myself because I hate to
> write code that only works with some fd types when it could work with all.

thanks, that's exactly what I wanted to hear :)

Alejandro

_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to