Cancel read on socket
Torsten Landschoff
torsten.landschoff at nambition.com
Tue May 27 13:47:42 UTC 2008
Leon Pollak wrote:
> Is there any way to cancel currently waiting read operation on UDP socket?
> I do not want to close it (need to use it immediately) or use select()
> (consumes a lot of CPU time).
>
Why does select() consume a lot of CPU time!? Wouldn't it be obvious to
fix select() then? Or poll for that matter...
AFAIK, the standard approach is to use a non-blocking socket, try a read
and only use select() if no data was available.
Sorry for not knowing a better/tested solution...
Torsten
--
Torsten Landschoff | Embedded software and FPGA development
nAmbition GmbH | Tatzberg 47, 01307 Dresden
| HRB NR. 23095 b. Amtsgericht Dresden
Geschäftsführung | Dr. J. Struckmeier, F. Pelzer, René M. Schretzmann
More information about the users
mailing list