A simple solution could be to implement a ping method with client and have server ping client once every N seconds. At the same time, fire a delayed call for N+5 seconds. if delayed call is executed first, drop connection.<br clear="all">

--<br>Konrads Smelkovs<br>Applied IT sorcery.<br>
<br><br><div class="gmail_quote">2010/4/30 Gabriel González <span dir="ltr">&lt;<a href="mailto:gabriel@cttc.upc.edu">gabriel@cttc.upc.edu</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

Hi there,<br>
I wrote a small server application with PB but now I have some problem<br>
with client disconnection. When I have a idle connection, the logout<br>
method at server never is called (this method let me have a list of<br>
current logged users) and then client appears always connected to<br>
server.<br>
<br>
I can see the same issue with the chatserver example from perspective<br>
broker doc with detached method.<br>
<br>
class ChatRealm:<br>
     implements(portal.IRealm)<br>
     def requestAvatar(self, avatarID, mind, *interfaces):<br>
         assert pb.IPerspective in interfaces<br>
         avatar = User(avatarID)<br>
         avatar.server = self.server<br>
         avatar.attached(mind)<br>
         return pb.IPerspective, avatar, lambda<br>
a=avatar:a.detached(mind)<br>
<br>
How can I detect that idle connection clients to call detached method?<br>
<br>
Thanks!<br>
<font color="#888888"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Aquest missatge ha estat analitzat per MailScanner<br>
a la cerca de virus i d&#39;altres continguts perillosos,<br>
i es considera que està net.<br>
<br>
<br>
</font><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>