Ftp.port readonly property



The Ftp.port property gets the current port used for connection to the FTP server or nil if connection have been closed.

Example

local net = require "net" local url = "your ftp server address" local ftpclient = net.Ftp(url, "anonymous", "guest") -- outputs ftp port print("ftp port = "..ftpclient.port)