[Twisted-Python] loseConnection() in BaseClient

Yun Mao maoy at cis.upenn.edu
Fri Sep 12 22:57:40 EDT 2003

On Fri, 12 Sep 2003, Itamar Shtull-Trauring wrote:

> On Tue, 9 Sep 2003 22:22:53 -0400 (EDT)
> Yun Mao <maoy at cis.upenn.edu> wrote:
> > Hi, I noticed that as a TCP client, the loseConnection() is inherited,
> > and without a reason argument. Why this is different from the
> > TCPServer, where a default reason argument is ConnectionDone?  Given
> > such info, how to let a TCP client protocol in connectionLost() detect
> > it's due to a network failure or a active close connection?
> It's there for a different reason, and the client connection will in
> fact get the reason it was disconnected. Hopefully there is even a test
> for this.

Could you tell me how to get the disconnected reason for client? In the 
clientfactory.clientConnectionLost, I always get connectionLost..



More information about the Twisted-Python mailing list