[Twisted-Python] connectionLost issue
Jean-Paul Calderone
exarkun at divmod.com
Fri Nov 23 12:05:35 EST 2007
On Thu, 22 Nov 2007 09:27:19 +0100, Mark Papazyan <mark.papazyan at gmx.de> wrote:
>Hello,
>
> [snip]
>
>class OutputConnector (Protocol):
>
> def __init__(self, session):
> self.session = session
>
>
> def sendStream(self, stream):
> self.transport.writeSomeData(stream)
>
> def clientConnectionLost(self, connector, reason):
> print 'Lost connection.'# Reason:', reason
>
>
I don't know if this is related to your question, but "writeSomeData"
is not the correct method to call on the transport in order to send
bytes. Instead, use the "write" method.
Jean-Paul
More information about the Twisted-Python
mailing list