LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   raw socket programming (https://www.linuxquestions.org/questions/linux-networking-3/raw-socket-programming-762122/)

bigboss360 10-15-2009 10:52 AM

raw socket programming
 
Hello,

I am using the write() call to to send data over a raw socket. While running my program, this call returns always the correct data length that are written to the socket even when the network is congested.

I would like to know whether the write() call is a blocking function, or a MAC buffer overflow might happens (frames dropped) even when the write() call returns the correct data lenght writen to the socket.


Thanks by advance

favoretti 10-15-2009 10:59 AM

write() is blocking, so if your socket is opened with O_NONBLOCK write will return EAGAIN.

bigboss360 10-17-2009 09:11 AM

Thank you very much. That was very useful.
Also, I would appreciate if you have a useful link to network programming.

Again many thanks!


All times are GMT -5. The time now is 11:25 AM.