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

📄 net::cmd.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
字号:
.\" 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::Cmd 3".TH Net::Cmd 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::Cmd \- Network Command class (as used by FTP, SMTP etc).SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 1\&    use Net::Cmd;\&\&    @ISA = qw(Net::Cmd);.Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"\&\f(CW\*(C`Net::Cmd\*(C'\fR is a collection of methods that can be inherited by a sub classof \f(CW\*(C`IO::Handle\*(C'\fR. These methods implement the functionality required for acommand based protocol, for example \s-1FTP\s0 and \s-1SMTP\s0..SH "USER METHODS".IX Header "USER METHODS"These methods provide a user interface to the \f(CW\*(C`Net::Cmd\*(C'\fR object..IP "debug ( \s-1VALUE\s0 )" 4.IX Item "debug ( VALUE )"Set the level of debug information for this object. If \f(CW\*(C`VALUE\*(C'\fR is not giventhen the current state is returned. Otherwise the state is changed to \&\f(CW\*(C`VALUE\*(C'\fR and the previous state returned..SpDifferent packagesmay implement different levels of debug but a non-zero value results in copies of all commands and responses also being sent to \s-1STDERR\s0..SpIf \f(CW\*(C`VALUE\*(C'\fR is \f(CW\*(C`undef\*(C'\fR then the debug level will be set to the defaultdebug level for the class..SpThis method can also be called as a \fIstatic\fR method to set/get the defaultdebug level for a given class..IP "message ()" 4.IX Item "message ()"Returns the text message returned from the last command.IP "code ()" 4.IX Item "code ()"Returns the 3\-digit code from the last command. If a command is pendingthen the value 0 is returned.IP "ok ()" 4.IX Item "ok ()"Returns non-zero if the last code value was greater than zero andless than 400. This holds true for most command servers. Serverswhere this does not hold may override this method..IP "status ()" 4.IX Item "status ()"Returns the most significant digit of the current status code. If a commandis pending then \f(CW\*(C`CMD_PENDING\*(C'\fR is returned..IP "datasend ( \s-1DATA\s0 )" 4.IX Item "datasend ( DATA )"Send data to the remote server, converting \s-1LF\s0 to \s-1CRLF\s0. Any line startingwith a '.' will be prefixed with another '.'.\&\f(CW\*(C`DATA\*(C'\fR may be an array or a reference to an array..IP "dataend ()" 4.IX Item "dataend ()"End the sending of data to the remote server. This is done by ensuring thatthe data already sent ends with \s-1CRLF\s0 then sending '.CRLF' to end thetransmission. Once this data has been sent \f(CW\*(C`dataend\*(C'\fR calls \f(CW\*(C`response\*(C'\fR andreturns true if \f(CW\*(C`response\*(C'\fR returns \s-1CMD_OK\s0..SH "CLASS METHODS".IX Header "CLASS METHODS"These methods are not intended to be called by the user, but used or over-ridden by a sub-class of \f(CW\*(C`Net::Cmd\*(C'\fR.IP "debug_print ( \s-1DIR\s0, \s-1TEXT\s0 )" 4.IX Item "debug_print ( DIR, TEXT )"Print debugging information. \f(CW\*(C`DIR\*(C'\fR denotes the direction \fItrue\fR beingdata being sent to the server. Calls \f(CW\*(C`debug_text\*(C'\fR before printing to\&\s-1STDERR\s0..IP "debug_text ( \s-1TEXT\s0 )" 4.IX Item "debug_text ( TEXT )"This method is called to print debugging information. \s-1TEXT\s0 isthe text being sent. The method should return the text to be printed.SpThis is primarily meant for the use of modules such as \s-1FTP\s0 where passwordsare sent, but we do not want to display them in the debugging information..IP "command ( \s-1CMD\s0 [, \s-1ARGS\s0, ... ])" 4.IX Item "command ( CMD [, ARGS, ... ])"Send a command to the command server. All arguments a first joined witha space character and \s-1CRLF\s0 is appended, this string is then sent to thecommand server..SpReturns undef upon failure.IP "unsupported ()" 4.IX Item "unsupported ()"Sets the status code to 580 and the response text to 'Unsupported command'.Returns zero..IP "response ()" 4.IX Item "response ()"Obtain a response from the server. Upon success the most significant digitof the status code is returned. Upon failure, timeout etc., \fIundef\fR isreturned..IP "parse_response ( \s-1TEXT\s0 )" 4.IX Item "parse_response ( TEXT )"This method is called by \f(CW\*(C`response\*(C'\fR as a method with one argument. It shouldreturn an array of 2 values, the 3\-digit status code and a flag which is truewhen this is part of a multi-line response and this line is not the list..IP "getline ()" 4.IX Item "getline ()"Retrieve one line, delimited by \s-1CRLF\s0, from the remote server. Returns \fIundef\fRupon failure..Sp\&\fB\s-1NOTE\s0\fR: If you do use this method for any reason, please remember to addsome \f(CW\*(C`debug_print\*(C'\fR calls into your method..IP "ungetline ( \s-1TEXT\s0 )" 4.IX Item "ungetline ( TEXT )"Unget a line of text from the server..IP "rawdatasend ( \s-1DATA\s0 )" 4.IX Item "rawdatasend ( DATA )"Send data to the remote server without performing any conversions. \f(CW\*(C`DATA\*(C'\fRis a scalar..IP "read_until_dot ()" 4.IX Item "read_until_dot ()"Read data from the remote server until a line consisting of a single '.'.Any lines starting with '..' will have one of the '.'s removed..SpReturns a reference to a list containing the lines, or \fIundef\fR upon failure..IP "tied_fh ()" 4.IX Item "tied_fh ()"Returns a filehandle tied to the Net::Cmd object.  After issuing acommand, you may read from this filehandle using \fIread()\fR or <>.  Thefilehandle will return \s-1EOF\s0 when the final dot is encountered.Similarly, you may write to the filehandle in order to send data tothe server after issuing a command that expects data to be written..SpSee the Net::POP3 and Net::SMTP modules for examples of this..SH "EXPORTS".IX Header "EXPORTS"\&\f(CW\*(C`Net::Cmd\*(C'\fR exports six subroutines, five of these, \f(CW\*(C`CMD_INFO\*(C'\fR, \f(CW\*(C`CMD_OK\*(C'\fR,\&\f(CW\*(C`CMD_MORE\*(C'\fR, \f(CW\*(C`CMD_REJECT\*(C'\fR and \f(CW\*(C`CMD_ERROR\*(C'\fR, correspond to possible resultsof \f(CW\*(C`response\*(C'\fR and \f(CW\*(C`status\*(C'\fR. The sixth is \f(CW\*(C`CMD_PENDING\*(C'\fR..SH "AUTHOR".IX Header "AUTHOR"Graham Barr <gbarr@pobox.com>.SH "COPYRIGHT".IX Header "COPYRIGHT"Copyright (c) 1995\-2006 Graham Barr. All rights reserved.This program is free software; you can redistribute it and/or modifyit under the same terms as Perl itself.

⌨️ 快捷键说明

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