[Twisted-Python] adding a new connection type

Itamar Shtull-Trauring twisted at itamarst.org
Sun May 26 18:20:13 EDT 2002


Eric C. Newton wrote:

> I want to add a new kind of connection to Twisted.  I have wrapped up
> the API for this connection with an interface very similar to the
> socket object interface.  It supports fileno(), bind(), connect(),
> listen(), accept(), send(), recv(), and of course, setblocking().

Well, first of all, what does it run over? And in what language is it 
written? And, what is it good for?

It sounds like you could implement it in a similar way to the ssl stuff 
in twisted.internet.ssl. It wouldn't be in the reactor API, but you 
could still use it directly with POSIX reactors (select, poll, gtk, qt).

I recommend getting CVS version (or new release which will be out Real 
Soon Now) and looking at how the SSL code hooks in - or you may write it 
from scratch based on the way tcp.py works if the differences are 
non-trivial.





More information about the Twisted-Python mailing list