--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 `CORDELIA',
it switches to Cordelia mode.

HTTP works fine with Twisted.Web.  I can serve pages over HTTP (which is
my desired outcome).  However, I'm not sure how to write the Cordelia
handling code.  I've tried my own custom `render_CORDELIA' function, but
it acts too much like HTTP (ie. it returns a result and terminates the
connection), which is not what I want, as the protocol I've designed
involves establishing a two-way conversation, not a single request and
response pair.

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?

Jashank

-- 
Jashank Jeremy
PGP: 0x25A5C309

Attachment: pgpLtZ2ZpI8hh.pgp
Description: PGP signature

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to