Re: [Twisted-Python] Creating a hybrid server in Twisted

2011-04-04 Thread Andrew Bennetts
Jashank Jeremy wrote: [...] > So I'm pretty much stuck in a rut. I don't want to totally reinvent the > wheel just to be able to protocol-switch; I'd prefer to make use of > existing code from Twisted. How do I hijack Twisted.Web to add protocol > switching? You could override lineReceived along

[Twisted-Python] Creating a hybrid server in Twisted

2011-04-04 Thread Jashank Jeremy
--text follows this line-- Hi, I'm trying to write a hybrid server that serves either HTTP or my own custom protocol depending on how it's addressed (distantly inspired by the IRC bouncer ZNC). If it receives a standard GET, POST, HEAD, etc. it sends HTTP traffic, or if it receives the bareword