[Twisted-Python] quitting clients connected to a server from serverside

Alvin Delagon adelagon at gmail.com
Tue May 20 10:52:03 EDT 2008

After looking through twisted.spread.db source, I noticed that it implements
twisted.internet.protocol. You could use the self.transport.loseConnection
facility to forcefully disconnect clients. If you want your client to do a
certain routine when the server shuts him down, you could send a custom
message to the client first that will trigger some cleanup procedure you
have in your client. I do similar stuff like this in our twisted xmpp
server. :)

On Tue, May 20, 2008 at 9:55 PM, Patrick Scharrenberg <pittipatti at web.de>

> Hi!
> I have a server with multiple clients (processing nodes) which send
> their data periodically to the server using PB.
> Now I'm trying to quit the clients from the server-side, eg. when the
> server is shut down.
> I tried to install a "quit-callback-routine" from the client on the
> server, which the server should start if it wants a client to shutdown.
> But this doesn't work, instead I get a
>        twisted.spread.jelly.InsecureJelly: method
> error.
> Please find attached some sample-code I used for testing.
> I think I was 'a little'  to optimistic, that things just work when
> trying to send methods over the net and expecting twisted to know how to
> handle with this.
> But what do I have to change, to archive the result I'm expecting?
> Thanks in advance
> Patrick
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080520/4149af3a/attachment.htm 

More information about the Twisted-Python mailing list