You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been looking through some C examples for some SocketCAN Netlink communications, and they all seem to set the socket buffer sizes. Like:
int sndbuf = 32768;
int rcvbuf = 1048576;
setsockopt(fd, SOL_SOCKET, SO_SNDBUF, (void *)&sndbuf, sizeof(sndbuf));
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (void *)&rcvbuf, sizeof(rcvbuf));
Is there a way to do this easily with this library - other than getting the socket file handle and doing it manually with libc functions? If it doesn't already exist, I can give it a try and send over a PR.
The text was updated successfully, but these errors were encountered:
Hi @fpagliughi, sorry for the delay. I don't support this right now, but this is actually very interesting to me mainly because if we can set the buffer size to a lower value than MAX_NL_LEN, we can simplify some of the parallel buffer code a bit by only allocating buffers that are rcvbuf size. This would also eliminate an environment variable that I thought was a little bit clunky.
Does this mean that the data from .recv() is guaranteed to be less than or equal to rcvbuf?
I've been looking through some C examples for some SocketCAN Netlink communications, and they all seem to set the socket buffer sizes. Like:
Is there a way to do this easily with this library - other than getting the socket file handle and doing it manually with libc functions? If it doesn't already exist, I can give it a try and send over a PR.
The text was updated successfully, but these errors were encountered: