Issue 200 in pyftpdlib: Turn FTPServer.serve_forever() into a classmethod

2 views
Skip to first unread message

pyft...@googlecode.com

unread,
Jan 20, 2012, 3:56:33 PM1/20/12
to pyftpdli...@googlegroups.com
Status: New
Owner: g.rodola
Labels: Type-Enhancement Priority-Medium Component-Library Version-0.6.0
Milestone-0.7.0 Compatibility Usability

New issue 200 by g.rodola: Turn FTPServer.serve_forever() into a classmethod
http://code.google.com/p/pyftpdlib/issues/detail?id=200

This was raised
https://groups.google.com/forum/#!searchin/pyftpdlib/classmethod/pyftpdlib/Y6bZpkJfNWA/TbIF896A5qMJ
and committed in r868.

Basically, this is useful when one wants to listen on multiple sockets.
Instead of doing:

>>> ftpd1 = ftpserver.FTPServer(address1, ftp_handler)
>>> ftpd2 = ftpserver.FTPServer(address2, ftp_handler)
>>> ftpd2.serve_forever() # start both servers

....we can now do:

>>> ftpd1 = ftpserver.FTPServer(address1, ftp_handler)
>>> ftpd2 = ftpserver.FTPServer(address2, ftp_handler)
>>> ftpserver.FTPServer.serve_forever()

Reply all
Reply to author
Forward
0 new messages