Send a PORT command with the current host and the given port number.
(self, host, port)
| 286 | return self.voidresp() |
| 287 | |
| 288 | def sendport(self, host, port): |
| 289 | '''Send a PORT command with the current host and the given |
| 290 | port number. |
| 291 | ''' |
| 292 | hbytes = host.split('.') |
| 293 | pbytes = [repr(port//256), repr(port%256)] |
| 294 | bytes = hbytes + pbytes |
| 295 | cmd = 'PORT ' + ','.join(bytes) |
| 296 | return self.voidcmd(cmd) |
| 297 | |
| 298 | def sendeprt(self, host, port): |
| 299 | '''Send an EPRT command with the current host and the given port number.''' |