Re: read()/write() versus recv()/send()

From: Michel Bardiaux (michel.bardiaux_at_peaktime.be)
Date: 03/08/04


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


Relevant Pages

  • Re: Account Management Delegation
    ... I'm already able to see the pwdlastset propertiy (read/write) for the "user ... I have given the user even "full control". ... In the security tab of a user account the delegated users should be ... But they cannot change the state of any Account properties flag. ...
    (microsoft.public.windows.server.active_directory)
  • only in vertical on continuous form?
    ... form use some queries to write each non null field to a table. ... How can i loop through the control values and read/write the records to ...
    (microsoft.public.access.forms)
  • Re: Chunked GZIP processing using Java Sockets
    ... Sockets give me the control on handling network problems and server ... advance the stream until the input stream is past the headers? ... My java client program is reading web sites using low level sockets. ... The response from the web site HTML is chunked and gzipped. ...
    (comp.lang.java.programmer)
  • Java can do it ... why not .NET ?
    ... I have a C# control that I want to embed in IE which need to connect back to ... the host server using sockets to display a status image. ... Is there any way to make a socket connection that will work on a default ...
    (microsoft.public.dotnet.security)
  • Re: Web stuff
    ... > I thought sockets was not possible with the Plug-In? ... > We chose not to use the plug-in on a project a couple of years ago ... If you have control over that, ...
    (comp.lang.tcl)