[Twisted-Python] raw socket IWriteDescriptor
Phil Mayers
p.mayers at imperial.ac.uk
Tue Oct 1 05:05:07 MDT 2013
On 01/10/13 09:05, David Stainton wrote:
>
> I just now realized that my fileno() method was incorrect.
> It now returns the descriptor instead of the python socket:
> return self.socket.fileno()
>
> I add the socket to the reactor in the constructor like this:
> reactor.addWriter(self)
Oops sorry didn't see that.
> BTW is that OK? Or is it better to add it to the reactor outside of the
> constructor?
I guess... it's not something most people do.
More information about the Twisted-Python
mailing list