Re: read()/write() versus recv()/send()
From: Michel Bardiaux (michel.bardiaux_at_peaktime.be)
Date: 03/08/04
- Next message: Valentin Nechayev: "Re: string concatenation"
- Previous message: Dan Pop: "Re: string concatenation"
- In reply to: Barry Margolin: "Re: read()/write() versus recv()/send()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 08 Mar 2004 14:30:27 +0100
Barry Margolin wrote:
> In article <31a13074.0403060754.6ef1ca22@posting.google.com>,
> fxn@hashref.com (Xavier Noria) wrote:
>
>
>>If you don't need that additional control, is there any relevant
>>difference between read/recv or write/send? I think if they are
>>equivalent they would be my default.
>
>
> If you don't make use of any of the flags arguments, they're equivalent.
> Some people like to use recv/send to emphasize that they're dealing with
> sockets rather than arbitrary types of streams. Others like to use
> read/write because they're more familiar. Whatever you like, go for it.
>
But beware: if you want your code to be ported later to MS-Win32, use
send/recv because read/write is *not* allowed for sockets on that OS.
-- Michel Bardiaux Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles Tel : +32 2 790.29.41
- Next message: Valentin Nechayev: "Re: string concatenation"
- Previous message: Dan Pop: "Re: string concatenation"
- In reply to: Barry Margolin: "Re: read()/write() versus recv()/send()"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|