Re[2]: First steps problems
From: Andreev Nikita <nik@xxxxxxxx>
Date: Tue, 13 Mar 2007 06:04:41 +0100 (CET)
Hi.

> You can use a timer that calls recv() on timeout. Or maybe subclass the event
> loop to integrate recv() calls. Using a timer that expires a couple of times
> a second is probably the easiest. That's what I do in my Qt App.

> \Niels

So the point is to call function like

void MyClass::Func() {
     MyClient->recv(1);
}

4 times a second for example. But the timer in wxWidgets calls Func()
regardless of the fact that is working already. And in some situations
I receive "I\O error" and client disconnects. So I need to modify
Func() this way:

void MyClass::Func() {
     if(!up) {
             up = true;
             MyClient->recv(1);
             up = false;
     }
}

But I'n not sure that it's the best choice. Any ideas?

Regards,
Nikita.