From: Patrik G. <gfe...@gm...> - 2006-06-01 21:09:58
|
Hi all, I have a little problem with the use of vncserver library; if the screen on= =20 the remote device doesn't change the client(s) are disconnected after 20s. =2D-- etherreal trace --- 86 *REF* 192.168.0.202 192.168.0.1 TCP 5900 > 29945 [ACK]... 87 19.992361 192.168.0.202 192.168.0.1 TCP 5900 > 29945 [FIN, ACK] =2D-- /trace @ .202 is the server (PDA), & .1 the VNC-Client If I keep the screen changing the connection persists. I looks like the ser= ver=20 terminates the connection after 20s w/o activity ... do I have to generate= =20 kind of a "hard beat" in my main programm to keep a connection even if=20 there's no change @ the PDA screen? =2D-- part of the main pgm --- rfbRunEventLoop(rfbScreen,-1,TRUE); // non-blocking event loop; a= =20 background thread is started while (1) { =20 if (rfbScreen -> clientHead !=3D NULL) { // only update the fb if there= are=20 connected clients if (notEqual(fbbuf,cmpfbbuf,compareBufferSize) =3D=3D 1) { // check i= f the=20 screen has changed=20 if (rotate =3D=3D 0) { rotate0 (rfbScreen,fbbuf,cmpfbbuf); };=20 if (rotate =3D=3D 1) { rotate90 (rfbScreen,fbbuf,cmpfbbuf); }; if (rotate =3D=3D 2) { rotate180(rfbScreen,fbbuf,cmpfbbuf); }; if (rotate =3D=3D 3) { rotate270(rfbScreen,fbbuf,cmpfbbuf); }; usleep(5000); } else { // no screen changes @ the PDA - no update needed usleep(50000); }; // end of [if] } else { // no clients connected @ the moment sleep(1); }; }; // end of [while]=20 =2D-- /pgm --- thanks for any tip/help in advance, Patrik |