MCPcopy Index your code
hub / github.com/python/cpython / sendport

Method sendport

Lib/ftplib.py:288–296  ·  view source on GitHub ↗

Send a PORT command with the current host and the given port number.

(self, host, port)

Source from the content-addressed store, hash-verified

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.'''

Callers 2

makeportMethod · 0.95
ftpcpFunction · 0.80

Calls 3

voidcmdMethod · 0.95
splitMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected