twistd内置了极其多的服务,tcp,ftp,web,xmpp等,可以通过调用twisted/EGG-INFO/scripts/twistd.py --help来进行查阅内置服务。如下
Commands:
conch A Conch SSH service.
dns A domain name server.
ftp An FTP server.
inetd An inetd(8) replacement.
mail An email service
manhole An interactive remote debugger service accessible via
telnet and ssh and providing syntax coloring and basic line
editing functionality.
manhole-old An interactive remote debugger service.
news A news server.
portforward A simple port-forwarder.
procmon A process watchdog / supervisor
socks A SOCKSv4 proxy service.
telnet A simple, telnet-based remote debugging service.
web A general-purpose web server which can serve from a
filesystem or application resource.
words A modern words server
xmpp-router An XMPP Router server
如果需要继续了解某一个服务可以
twistd ftp --help
....
这些功能都是由内置插件完成的,例如我希望搭建一个http的文件服务器,只需要这么做就可以
twistd web --port=80 --path=D:/
这样就会自动将D盘映射到http服务器上,既可以服务一个文件系统,也可以服务一个应用程序资源