04.12.2010, 03:54, "Mads Kiilerich" <[email protected]>: I was tried that solution and it did not help in our situation because write socket (wfds) when you moving your mouse, or doing some action will send data to server and timer will restarts.
> I don't remember how connections are kept alive with mstsc - or if we just > can expect to receive keep-alive messages continuously. I guess I could > dissect some mstsc sessions and figure it out. It is a good idea, but how can i do this? I mean watch session\sources of mstsc. > > Anna Martynova wrote, On 12/03/2010 01:12 PM: >> >> So, the question is: how to detect the moment when server becomes >> unavailable? May be, we should use TCP keepalive? When server stops >> response to keepalive probes, we will receive 'ETIMEDOUT' signal and >> we can show some notice to user: "server is not available". >> I think, keepalive is better then using 'select' on network socket, >> because 'select' does not check the connection from client to server, >> it only checks if the socket is ready to write. > > I can imagine that TCP keep-alive could be (too) hard to get working > reliably on all platforms, but it can probably be done if you are persistent > and know what you are doing. > I was tried that solution too and SO_KEEPALIVE flag with other keepalive flags works only if connection closes and user does nothing with application. I added the following lines to function tcp_connect: int i = 1; setsockopt(tcp->sock, SOL_SOCKET, SO_KEEPALIVE, &i, sizeof(int)); setsockopt(tcp->sock, SOL_TCP, TCP_KEEPCNT, &i, sizeof(int)); i = 10; setsockopt(tcp->sock, SOL_TCP, TCP_KEEPIDLE, &i, sizeof(int)); i = 10; setsockopt(tcp->sock, SOL_TCP, TCP_KEEPINTVL, &i, sizeof(int)); and if i broke connection and do nothing with application (i mean moving mouse, pressing keys on keyboard) keepalive tiomeout brokes connection correctly. And if we have some data to send from our input devices keepalive never works. Maybe i'm doing something wrong? My client OS is CentOS. Thanks in advance! -- mailto: [email protected] ------------------------------------------------------------------------------ What happens now with your Lotus Notes apps - do you make another costly upgrade, or settle for being marooned without product support? Time to move off Lotus Notes and onto the cloud with Force.com, apps are easier to build, use, and manage than apps on traditional platforms. Sign up for the Lotus Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d _______________________________________________ Freerdp-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freerdp-devel
