(self, conn, encoding=DEFAULT_ENCODING)
| 104 | dtp_handler = DummyDTPHandler |
| 105 | |
| 106 | def __init__(self, conn, encoding=DEFAULT_ENCODING): |
| 107 | asynchat.async_chat.__init__(self, conn) |
| 108 | # tells the socket to handle urgent data inline (ABOR command) |
| 109 | self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_OOBINLINE, 1) |
| 110 | self.set_terminator(b"\r\n") |
| 111 | self.in_buffer = [] |
| 112 | self.dtp = None |
| 113 | self.last_received_cmd = None |
| 114 | self.last_received_data = bytearray() |
| 115 | self.next_response = '' |
| 116 | self.next_data = None |
| 117 | self.rest = None |
| 118 | self.next_retr_data = RETR_DATA |
| 119 | self.push('220 welcome') |
| 120 | self.encoding = encoding |
| 121 | # We use this as the string IPv4 address to direct the client |
| 122 | # to in response to a PASV command. To test security behavior. |
| 123 | # https://bugs.python.org/issue43285/. |
| 124 | self.fake_pasv_server_ip = '252.253.254.255' |
| 125 | |
| 126 | def collect_incoming_data(self, data): |
| 127 | self.in_buffer.append(data) |
nothing calls this directly
no test coverage detected