On 25.05.2011 10:36, Piotr Domagalski wrote:

> I have a simple question and didn't manage to find the answer anywhere in the
> docs: are SocketCAN sockets blocking or non-blocking by default?
> 
> TCP sockets are blocking by default and this is what I'm used to. Looking at
> SocketCAN utils, cangen for example, indicates that as far as write() goes, by
> default it doesn't block but it just returns ENOBUFS. On the other hand,
> read() blocks (at least on my vcan interface) when there is nothing to read.

Hi Piotr,

indeed the write-side of the can-raw socket tries to en-queue the CAN frame
directly into the netdevices tx queue.

There's still some discussion how to go on with blocking write of several CAN
applications and how long the tx queue should be to have a prompt and
contemporary transmission on CAN (as the user would expect). These are the new
challenges when having a multi-user system ;-)

Regards,
Oliver
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to