Commit 3241fc2b authored by Amos Latteier's avatar Amos Latteier

Synced ftp server with Sam's latest. He added contol over interface binding at my request.

parent 9ad9a5ba
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# If you are interested in using this software in a commercial context, # If you are interested in using this software in a commercial context,
# or in purchasing support, please contact the author. # or in purchasing support, please contact the author.
RCS_ID = '$Id: ftp_server.py,v 1.9 2000/01/14 02:35:56 amos Exp $' RCS_ID = '$Id: ftp_server.py,v 1.10 2000/03/30 18:03:37 amos Exp $'
# An extensible, configurable, asynchronous FTP server. # An extensible, configurable, asynchronous FTP server.
# #
...@@ -691,10 +691,12 @@ class ftp_server (asyncore.dispatcher): ...@@ -691,10 +691,12 @@ class ftp_server (asyncore.dispatcher):
self, self,
authorizer, authorizer,
hostname =None, hostname =None,
ip ='',
port =21, port =21,
resolver =None, resolver =None,
logger_object=logger.file_logger (sys.stdout) logger_object=logger.file_logger (sys.stdout)
): ):
self.ip = ip
self.port = port self.port = port
self.authorizer = authorizer self.authorizer = authorizer
...@@ -716,7 +718,7 @@ class ftp_server (asyncore.dispatcher): ...@@ -716,7 +718,7 @@ class ftp_server (asyncore.dispatcher):
self.create_socket (socket.AF_INET, socket.SOCK_STREAM) self.create_socket (socket.AF_INET, socket.SOCK_STREAM)
self.set_reuse_addr() self.set_reuse_addr()
self.bind (('', self.port)) self.bind ((self.ip, self.port))
self.listen (5) self.listen (5)
if not logger_object: if not logger_object:
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# If you are interested in using this software in a commercial context, # If you are interested in using this software in a commercial context,
# or in purchasing support, please contact the author. # or in purchasing support, please contact the author.
RCS_ID = '$Id: ftp_server.py,v 1.9 2000/01/14 02:35:56 amos Exp $' RCS_ID = '$Id: ftp_server.py,v 1.10 2000/03/30 18:03:37 amos Exp $'
# An extensible, configurable, asynchronous FTP server. # An extensible, configurable, asynchronous FTP server.
# #
...@@ -691,10 +691,12 @@ class ftp_server (asyncore.dispatcher): ...@@ -691,10 +691,12 @@ class ftp_server (asyncore.dispatcher):
self, self,
authorizer, authorizer,
hostname =None, hostname =None,
ip ='',
port =21, port =21,
resolver =None, resolver =None,
logger_object=logger.file_logger (sys.stdout) logger_object=logger.file_logger (sys.stdout)
): ):
self.ip = ip
self.port = port self.port = port
self.authorizer = authorizer self.authorizer = authorizer
...@@ -716,7 +718,7 @@ class ftp_server (asyncore.dispatcher): ...@@ -716,7 +718,7 @@ class ftp_server (asyncore.dispatcher):
self.create_socket (socket.AF_INET, socket.SOCK_STREAM) self.create_socket (socket.AF_INET, socket.SOCK_STREAM)
self.set_reuse_addr() self.set_reuse_addr()
self.bind (('', self.port)) self.bind ((self.ip, self.port))
self.listen (5) self.listen (5)
if not logger_object: if not logger_object:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment