Part of twisted.protocols.ftp View Source View In Hierarchy
Instance Variables | state | The current server state. One of UNAUTH ,
INAUTH , AUTHED , RENAMING .
|
shell | The connected avatar | |
binary | The transfer mode. If false, ASCII. | |
dtpFactory | Generates a single DTP for this session | |
dtpPort | Port returned from listenTCP | |
listenFactory | A callable with the signature of twisted.internet.interfaces.IReactorTCP.listenTCP
which will be used to create Ports for passive connections (mainly for
testing).
| |
passivePortRange | iterator used as source of passive port numbers.
(type: iterator
) |
Method | reply | Undocumented |
Method | connectionMade | Called when a connection is made. |
Method | connectionLost | Called when the connection is shut down. |
Method | timeoutConnection | Called when the connection times out. |
Method | lineReceived | Override this for when each line is received. |
Method | processCommand | Undocumented |
Method | getDTPPort | Return a port for passive access, using
self.passivePortRange attribute.
|
Method | ftp_USER | First part of login. Get the username the peer wants to authenticate as. |
Method | ftp_PASS | Second part of login. Get the password the peer wants to authenticate with. |
Method | ftp_PASV | Request for a passive connection |
Method | ftp_PORT | Undocumented |
Method | ftp_LIST | No summary |
Method | ftp_NLST | No summary |
Method | ftp_CWD | Undocumented |
Method | ftp_CDUP | Undocumented |
Method | ftp_PWD | Undocumented |
Method | ftp_RETR | Undocumented |
Method | ftp_STOR | Undocumented |
Method | ftp_SIZE | Undocumented |
Method | ftp_MDTM | Undocumented |
Method | ftp_TYPE | Undocumented |
Method | type_A | Undocumented |
Method | type_I | Undocumented |
Method | type_UNKNOWN | Undocumented |
Method | ftp_SYST | Undocumented |
Method | ftp_STRU | Undocumented |
Method | ftp_MODE | Undocumented |
Method | ftp_MKD | Undocumented |
Method | ftp_RMD | Undocumented |
Method | ftp_DELE | Undocumented |
Method | ftp_NOOP | Undocumented |
Method | ftp_RNFR | Undocumented |
Method | ftp_RNTO | Undocumented |
Method | ftp_QUIT | Undocumented |
Method | cleanupDTP | call when DTP connection exits |
Inherited from LineReceiver:
Method | clearLineBuffer | Clear buffered data. |
Method | dataReceived | Protocol.dataReceived. Translates bytes into lines, and calls lineReceived (or rawDataReceived, depending on mode.) |
Method | setLineMode | Sets the line-mode of this receiver. |
Method | setRawMode | Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than lineReceived. |
Method | rawDataReceived | Override this for when raw data is received. |
Method | sendLine | Sends a line to the other end of the connection. |
Method | lineLengthExceeded | Called when the maximum line length has been reached. Override if it needs to be dealt with in some special way. |
Inherited from BaseProtocol (via LineReceiver, Protocol):
Method | makeConnection | Make a connection to a transport and a server. |
Inherited from _PauseableMixin (via LineReceiver):
Method | pauseProducing | Undocumented |
Method | resumeProducing | Undocumented |
Method | stopProducing | Undocumented |
Inherited from TimeoutMixin:
Method | callLater | Wrapper around reactor.callLater for test purpose.
|
Method | resetTimeout | Reset the timeout count down. |
Method | setTimeout | Change the timeout period |
Method | __timedOut | Undocumented |
Called when a connection is made.
This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.Called when the connection is shut down.
Clear any circular references here, and any external references to this Protocol. The connection has been closed.Parameters | reason | (type: twisted.python.failure.Failure
) |
Called when the connection times out.
Override to define behavior other than dropping the connection.Parameters | line | The line which was received with the delimiter removed.
(type: str
) |
self.passivePortRange
attribute.
Request for a passive connection
from the rfc:This command requests the server-DTP to "listen" on a data port (which is not its default data port) and to wait for a connection rather than initiate one upon receipt of a transfer command. The response to this command includes the host and port address this server is listening on.
Parameters | path | The path for which a directory listing should be returned.
(type: str
) |
Returns | a Deferred which
will be fired when the listing request is finished.
(type: Deferred
) |