Question

I've been looking around on the net now for quite a while and while a lot of documentation refers to strports and point to Twisted website I can't find anything on there which actually explains what the syntax is.

Does anyone know of a document that describes the syntax for strports?

Was it helpful?

Solution

There's probably some confusion here, and maybe this isn't exactly the answer you're looking for. But it's the answer I'd rather you were looking for, so I hope that's good enough. ;)

strports is an older, non-extensible API that lets you create services. This is the twisted.application.strports module. Much of it is now deprecated.

endpoints is a newer, extensible API that lets you create clients or servers and comes with a little helper that also lets you create services for these. This is the twisted.internet.endpoints module. You should prefer to use it over strports for various reasons.

Endpoints are documented in http://twistedmatrix.com/documents/current/core/howto/endpoints.html. Near the end are some examples demonstrating all of the endpoints distributed with Twisted Core (ie, ignoring all of the subprojects). It so happens that Twisted Conch now offers an endpoint as well, documented separately in http://twistedmatrix.com/documents/current/conch/howto/conch_client.html.

The documentation can't be exhaustive since the system is extensible via plugins - you may find other projects implement and provide other kinds of endpoints.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top