I am writing program using threads, and it should behave something
like this.
Thread should wait for message received from specific socket, and if
message is received thread should continue normally, but if message is
not received in couple of seconds thread should do something else.
I implemented timeouts by using pthread_cond_wait until counter (which
is incremented every sec) comes to certain value, but I do not know
how to unblock thread if message is received.
Any help is apprisiated.
/cheers,
No threads needed here.
>Thread should wait for message received from specific socket, and if
>message is received thread should continue normally, but if message is
>not received in couple of seconds thread should do something else.
>I implemented timeouts by using pthread_cond_wait until counter (which
>is incremented every sec) comes to certain value, but I do not know
>how to unblock thread if message is received.
>Any help is apprisiated.
man select
--
Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.5" / 37N 20' 15.3"
Internet: steve @ Watt.COM Whois: SW32-ARIN
Free time? There's no such thing. It just comes in varying prices...