⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 net::ftp.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
📖 第 1 页 / 共 2 页
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings.  \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote.  \*(C+ will.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\.    ds -- \(*W-.    ds PI pi.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch.    ds L" "".    ds R" "".    ds C` "".    ds C' ""'br\}.el\{\.    ds -- \|\(em\|.    ds PI \(*p.    ds L" ``.    ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el       .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD.  Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\.    de IX.    tm Index:\\$1\t\\n%\t"\\$2"...    nr % 0.    rr F.\}.el \{\.    de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear.  Run.  Save yourself.  No user-serviceable parts..    \" fudge factors for nroff and troff.if n \{\.    ds #H 0.    ds #V .8m.    ds #F .3m.    ds #[ \f1.    ds #] \fP.\}.if t \{\.    ds #H ((1u-(\\\\n(.fu%2u))*.13m).    ds #V .6m.    ds #F 0.    ds #[ \&.    ds #] \&.\}.    \" simple accents for nroff and troff.if n \{\.    ds ' \&.    ds ` \&.    ds ^ \&.    ds , \&.    ds ~ ~.    ds /.\}.if t \{\.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u".    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}.    \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E.    \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'.    \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\.    ds : e.    ds 8 ss.    ds o a.    ds d- d\h'-1'\(ga.    ds D- D\h'-1'\(hy.    ds th \o'bp'.    ds Th \o'LP'.    ds ae ae.    ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "Net::FTP 3".TH Net::FTP 3 "2007-12-18" "perl v5.10.0" "Perl Programmers Reference Guide".\" For nroff, turn off justification.  Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"Net::FTP \- FTP Client class.SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 1\&    use Net::FTP;\&\&    $ftp = Net::FTP\->new("some.host.name", Debug => 0)\&      or die "Cannot connect to some.host.name: $@";\&\&    $ftp\->login("anonymous",\*(Aq\-anonymous@\*(Aq)\&      or die "Cannot login ", $ftp\->message;\&\&    $ftp\->cwd("/pub")\&      or die "Cannot change working directory ", $ftp\->message;\&\&    $ftp\->get("that.file")\&      or die "get failed ", $ftp\->message;\&\&    $ftp\->quit;.Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"\&\f(CW\*(C`Net::FTP\*(C'\fR is a class implementing a simple \s-1FTP\s0 client in Perl asdescribed in \s-1RFC959\s0.  It provides wrappers for a subset of the \s-1RFC959\s0commands..SH "OVERVIEW".IX Header "OVERVIEW"\&\s-1FTP\s0 stands for File Transfer Protocol.  It is a way of transferringfiles between networked machines.  The protocol defines a client(whose commands are provided by this module) and a server (notimplemented in this module).  Communication is always initiated by theclient, and the server responds with a message and a status code (andsometimes with data)..PPThe \s-1FTP\s0 protocol allows files to be sent to or fetched from theserver.  Each transfer involves a \fBlocal file\fR (on the client) and a\&\fBremote file\fR (on the server).  In this module, the same file namewill be used for both local and remote if only one is specified.  Thismeans that transferring remote file \f(CW\*(C`/path/to/file\*(C'\fR will try to putthat file in \f(CW\*(C`/path/to/file\*(C'\fR locally, unless you specify a local filename..PPThe protocol also defines several standard \fBtranslations\fR which thefile can undergo during transfer.  These are \s-1ASCII\s0, \s-1EBCDIC\s0, binary,and byte.  \s-1ASCII\s0 is the default type, and indicates that the sender offiles will translate the ends of lines to a standard representationwhich the receiver will then translate back into their localrepresentation.  \s-1EBCDIC\s0 indicates the file being transferred is in\&\s-1EBCDIC\s0 format.  Binary (also known as image) format sends the data asa contiguous bit stream.  Byte format transfers the data as bytes, thevalues of which remain the same regardless of differences in byte sizebetween the two machines (in theory \- in practice you should only usethis if you really know what you're doing)..SH "CONSTRUCTOR".IX Header "CONSTRUCTOR".IP "new ([ \s-1HOST\s0 ] [, \s-1OPTIONS\s0 ])" 4.IX Item "new ([ HOST ] [, OPTIONS ])"This is the constructor for a new Net::FTP object. \f(CW\*(C`HOST\*(C'\fR is thename of the remote host to which an \s-1FTP\s0 connection is required..Sp\&\f(CW\*(C`HOST\*(C'\fR is optional. If \f(CW\*(C`HOST\*(C'\fR is not given then it may instead bepassed as the \f(CW\*(C`Host\*(C'\fR option described below..Sp\&\f(CW\*(C`OPTIONS\*(C'\fR are passed in a hash like fashion, using key and value pairs.Possible options are:.Sp\&\fBHost\fR \- \s-1FTP\s0 host to connect to. It may be a single scalar, as defined forthe \f(CW\*(C`PeerAddr\*(C'\fR option in IO::Socket::INET, or a reference toan array with hosts to try in turn. The \*(L"host\*(R" method will return the valuewhich was used to connect to the host..Sp\&\fBFirewall\fR \- The name of a machine which acts as an \s-1FTP\s0 firewall. This can beoverridden by an environment variable \f(CW\*(C`FTP_FIREWALL\*(C'\fR. If specified, and thegiven host cannot be directly connected to, then theconnection is made to the firewall machine and the string \f(CW@hostname\fR isappended to the login identifier. This kind of setup is also referred toas an ftp proxy..Sp\&\fBFirewallType\fR \- The type of firewall running on the machine indicated by\&\fBFirewall\fR. This can be overridden by an environment variable\&\f(CW\*(C`FTP_FIREWALL_TYPE\*(C'\fR. For a list of permissible types, see the description offtp_firewall_type in Net::Config..Sp\&\fBBlockSize\fR \- This is the block size that Net::FTP will use when doingtransfers. (defaults to 10240).Sp\&\fBPort\fR \- The port number to connect to on the remote machine for the\&\s-1FTP\s0 connection.Sp\&\fBTimeout\fR \- Set a timeout value (defaults to 120).Sp\&\fBDebug\fR \- debug level (see the debug method in Net::Cmd).Sp\&\fBPassive\fR \- If set to a non-zero value then all data transfers willbe done using passive mode. If set to zero then data transfers will bedone using active mode.  If the machine is connected to the Internetdirectly, both passive and active mode should work equally well.Behind most firewall and \s-1NAT\s0 configurations passive mode has a betterchance of working.  However, in some rare firewall configurations,active mode actually works when passive mode doesn't.  Some really old\&\s-1FTP\s0 servers might not implement passive transfers.  If not specified,then the transfer mode is set by the environment variable\&\f(CW\*(C`FTP_PASSIVE\*(C'\fR or if that one is not set by the settings done by the\&\fIlibnetcfg\fR utility.  If none of these apply then passive mode isused..Sp\&\fBHash\fR \- If given a reference to a file handle (e.g., \f(CW\*(C`\e*STDERR\*(C'\fR),print hash marks (#) on that filehandle every 1024 bytes.  Thissimply invokes the \f(CW\*(C`hash()\*(C'\fR method for you, so that hash marksare displayed for all transfers.  You can, of course, call \f(CW\*(C`hash()\*(C'\fRexplicitly whenever you'd like..Sp\&\fBLocalAddr\fR \- Local address to use for all socket connections, thisargument will be passed to IO::Socket::INET.SpIf the constructor fails undef will be returned and an error message willbe in $@.SH "METHODS".IX Header "METHODS"Unless otherwise stated all methods return either a \fItrue\fR or \fIfalse\fRvalue, with \fItrue\fR meaning that the operation was a success. When a methodstates that it returns a value, failure will be returned as \fIundef\fR or anempty list..IP "login ([\s-1LOGIN\s0 [,PASSWORD [, \s-1ACCOUNT\s0] ] ])" 4.IX Item "login ([LOGIN [,PASSWORD [, ACCOUNT] ] ])"Log into the remote \s-1FTP\s0 server with the given login information. Ifno arguments are given then the \f(CW\*(C`Net::FTP\*(C'\fR uses the \f(CW\*(C`Net::Netrc\*(C'\fRpackage to lookup the login information for the connected host.If no information is found then a login of \fIanonymous\fR is used.If no password is given and the login is \fIanonymous\fR then \fIanonymous@\fRwill be used for password..SpIf the connection is via a firewall then the \f(CW\*(C`authorize\*(C'\fR method willbe called with no arguments..IP "authorize ( [\s-1AUTH\s0 [, \s-1RESP\s0]])" 4.IX Item "authorize ( [AUTH [, RESP]])"This is a protocol used by some firewall ftp proxies. It is usedto authorise the user to send data out.  If both arguments are not specifiedthen \f(CW\*(C`authorize\*(C'\fR uses \f(CW\*(C`Net::Netrc\*(C'\fR to do a lookup..IP "site (\s-1ARGS\s0)" 4.IX Item "site (ARGS)"Send a \s-1SITE\s0 command to the remote server and wait for a response..SpReturns most significant digit of the response code..IP "ascii" 4.IX Item "ascii"Transfer file in \s-1ASCII\s0. \s-1CRLF\s0 translation will be done if required.IP "binary" 4.IX Item "binary"Transfer file in binary mode. No transformation will be done..Sp\&\fBHint\fR: If both server and client machines use the same line ending fortext files, then it will be faster to transfer all files in binary mode..IP "rename ( \s-1OLDNAME\s0, \s-1NEWNAME\s0 )" 4.IX Item "rename ( OLDNAME, NEWNAME )"Rename a file on the remote \s-1FTP\s0 server from \f(CW\*(C`OLDNAME\*(C'\fR to \f(CW\*(C`NEWNAME\*(C'\fR. Thisis done by sending the \s-1RNFR\s0 and \s-1RNTO\s0 commands..IP "delete ( \s-1FILENAME\s0 )" 4.IX Item "delete ( FILENAME )"Send a request to the server to delete \f(CW\*(C`FILENAME\*(C'\fR..IP "cwd ( [ \s-1DIR\s0 ] )" 4.IX Item "cwd ( [ DIR ] )"Attempt to change directory to the directory given in \f(CW$dir\fR.  If\&\f(CW$dir\fR is \f(CW".."\fR, the \s-1FTP\s0 \f(CW\*(C`CDUP\*(C'\fR command is used to attempt tomove up one directory. If no directory is given then an attempt is madeto change the directory to the root directory..IP "cdup ()" 4.IX Item "cdup ()"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -