select on udp recvfrom doesn't work ???

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Aug 10 21:29:34 UTC 2010


On Tue, Aug 10, 2010 at 05:25:03PM -0400, Dave Cramer wrote:
> Is there some reason that doing using select does not see the data
> coming to a udp socket that is not connected, but is bound and is
> listening.
> 
> I am broadcasting data to the socket. I have confirmed that if I don't
> use select that it receives data.
> 
> What I am trying to do is synchronize multiple linux embedded systems
> to within 10ms. My thought is to use a UDP broadcast to start the
> synchronization then use the internal clocks. If anyone has any
> interesting ideas I'm open to suggestions.

Have you heard of ntp?  It does just that, and way more accurately,
and is done by people that understand time synchronization.  Don't try
to reinvent a wheel, when you don't know how a wheel works.

-- 
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list