11-22-05 12:50 PM
Roman Mashak wrote:
> Hello, Måns!
> You wrote on Fri, 18 Nov 2005 08:44:44 +0000:
>
> ??>> What are the benefits/drawbacks of using read() on socket operations
,
> ??>> except it's a general way for dealing with file descriptors? What
> ??>> about portability etc.?
>
> MR> recv() takes an extra flags parameter. That's the only difference.
> I assume, both functions are equally portable?
>
> With best regards, Roman Mashak. E-mail: mrv@tusur.ru
>
>
On Unix, read or recv will do exactly the same (apart from the flags
thing). On Windows, read() on a socket is not allowed. So, for
portability it is better to use recv for all sockets.
--
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux@mediaxim.be
Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/
[ Post a follow-up to this message ]
|