All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] socket XDDP recvfrom timeout ?
@ 2016-06-24 14:35 Laurent LEQUIEVRE
  2016-06-24 14:37 ` Laurent LEQUIEVRE
  0 siblings, 1 reply; 3+ messages in thread
From: Laurent LEQUIEVRE @ 2016-06-24 14:35 UTC (permalink / raw)
  To: xenomai, Laurent LEQUIEVRE

Hello,

I try to use the socket XDDP with the posix skin to communicate from RT 
thread to non RT thread.

To get a non blocked 'recvfrom', I added the flag 'MSG_DONTWAIT', and 
it's work fine.

But how to setup a timeout for this function ?

I tried to set the flag 'SO_RCVTIEMO' by using 2 methods :

struct timeval tv;
tv.tv_sec=nb seconds
tv.tv_usec=nb micro seconds
setsockopt(socket_id,SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); --> 
doesn't work, blocked !

timeout (in nano seonds)
ioctl(socket_id, SO_RCVTIMEO, &timeout);  --> doesn't work, blocked !


Thanks for your help,

Laurent LEQUIEVRE





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-24 15:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-24 14:35 [Xenomai] socket XDDP recvfrom timeout ? Laurent LEQUIEVRE
2016-06-24 14:37 ` Laurent LEQUIEVRE
2016-06-24 15:36   ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.