InterviewSolution
| 1. |
What Is The Difference Between Read() And Recv()? |
|
Answer» read() is equivalent to RECV() with a flags parameter of 0. Other values for the flags parameter change the behaviour of recv(). Similarly, write() is equivalent to send() with flags == 0. It is unlikely that send()/recv() would be DROPPED; perhaps someone with a copy of the POSIX drafts for socket calls can check... Portability note: non-unix SYSTEMS may not allow read()/write() on sockets, but recv()/send() are USUALLY ok. This is true on Windows and OS/2, for example. read() is equivalent to recv() with a flags parameter of 0. Other values for the flags parameter change the behaviour of recv(). Similarly, write() is equivalent to send() with flags == 0. It is unlikely that send()/recv() would be dropped; perhaps someone with a copy of the POSIX drafts for socket calls can check... Portability note: non-unix systems may not allow read()/write() on sockets, but recv()/send() are usually ok. This is true on Windows and OS/2, for example. |
|