Re: [xml] nanohttp.c and winsock

Date view Thread view Subject view Author view

From: Bjorn Reese (breese@mail1.stofanet.dk)
Date: Mon Oct 09 2000 - 08:12:58 EDT


Wayne Davison wrote:

> - I changed read() into recv() (but see note below).
>
> - I changed write() into send() (but see note below).
>
> In order to have a minimal impact on non-winsock code, I defined
> recv/send/closesocket to be their former functions on non-winsock systems
> (even though I don't think that the recv and send defines are strictly
> needed).

You are correct, the recv/send defines are not strictly needed. Most
Unix programmers use read/write because they are generic functions
that works on sockets as well as files, devices, and others. However,
read/write just calls recv/send for sockets, so there is really no
reason for the two defines.

I have written socket code for several cross-platform projects, and
done exactly (with the exception of the recv/send defines) as you
have done.

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Oct 09 2000 - 09:43:20 EDT