read() or recv() ?

read() or recv() ?

Post by Wilfred Mollenvang » Wed, 13 Jul 1994 00:31:11



Hi,

I've got a program which does a select() on an UDP socket. When data
arives it tries to read it with read(2) but fails and read()
returns EBADMSG. I tried to get the data with recv() and
that works.

My question is when to use read() and when recv() (or even recvmsg())
or should I always use recv() to make sure I'll get the data?  This is
on a Sequent running DYNIX/ptx (sort of a sysvr4 box).

Thanx,

Wilfred Mollenvanger.