[Twisted-Python] Understanding the IOCP reactor and adding spawnProcess

Justin Johnson justinjohnson at gmail.com
Mon Jul 11 13:52:45 MDT 2005


On 7/11/05, Justin Johnson <justinjohnson at gmail.com> wrote: 
> 
> On 7/11/05, Jp Calderone <exarkun at divmod.com> wrote: 
> > 
> > On Mon, 11 Jul 2005 12:16:35 -0500, Justin Johnson <justinjohnson at gmail.com 
> > > wrote:
> > >On 7/11/05, Jp Calderone <exarkun at divmod.com> wrote:
> > >>
> > > [snip]
> > 
> > That mostly sounds correct, except the last bit. What makes it a 
> > transport is that it implements /all/ of ITransport. Moreover, 
> > ProcessProtocols expect their transport to be an IProcessTransport, which 
> > adds several methods on top of ITransport. Everything in each of those 
> > interfaces needs to be implemented. 
> 
>  Ahh... I missed those interfaces because I was starting with 
> win32eventreactor.Process, which doesn't implement either ITransport or 
> IProcessTransport (either with an implements() or by defining all of those 
> methods). 
>  
 Hmm.. I somehow missed the obvious implements call. But I still don't see 
all methods defined (e.g. getPeer, getHost, writeSequence).

 After some more thought about this I think I will have to define new xxxOps 
> methods for stdout and stderr (and maybe stdin as well). These ops' ovDone 
> methods will call the methods on the transport (Process) appropriate for 
> ProcessProtocols. 
> 
> For reference, <http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.ITransport.html> 
> > and <http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.IProcessTransport.html 
> > >.
> > 
> > Jp
> > 
> > _______________________________________________
> > 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: </pipermail/twisted-python/attachments/20050711/8ee63609/attachment.html>


More information about the Twisted-Python mailing list