Jan Kiszka wrote:
Daniel Schnell wrote:
Hi,
If one opens two sockets to one CAN port and wants to use one socket
file descriptor for reading and the other for writing, is it possible to
limit the writing socket to _write only_, so it doesn't receive messages
?
Note that the messages are aways received and handled by the ISR. If
nobody is waiting on messages defined by the filter definitions, they
will be discarded.
Option 1: Do not bind the socket, use sendto/sendmsg for transmitting
(send requires binding).
Yes, this will avoid checking one unnecessary filter definition (a bit
less overhead). But using just one socket would be fine as well ;-).
Option 2: Register an impossible filter for the write-only socket. This
is suboptimal ATM. Actually we should allow registering an empty filter
list for this purpose. This has been recently discussed on the socketcan
list, but I'm not aware of any concrete result.
Oliver answered and liked the idea, but there is no agreement yet.
Wolfgang.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help