Re: [xml] nanohttp.c and winsock

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Wed Oct 11 2000 - 07:13:14 EDT


On Mon, Oct 09, 2000 at 12:12:58PM +0000, Bjorn Reese wrote:
>
> 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.

  I implemented Bjorn suggestion, recv and send should be compatible
with read and write on any decently Posixised system :-)

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe
----
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 : Wed Oct 11 2000 - 09:43:41 EDT