Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
At this point, I would be recommending enabling the Debug argument to the Net::NNTP constructor in your script to show NNTP protocol communication between your client script and local news server.

For example:

rob@development:/home/rob$ cat nntp.perl use Net::NNTP; use Socket; my $nntp = Net::NNTP->new('news-server', 'Debug' => 1); my $hostaddr = $nntp->connected; print inet_ntoa((sockaddr_in($hostaddr))[1]), "\n" if defined $hostadd +r; rob@development:/home/rob$ perl nntp.perl Net::NNTP>>> Net::NNTP(2.22) Net::NNTP>>> Net::Cmd(2.24) Net::NNTP>>> Exporter(5.562) Net::NNTP>>> IO::Socket::INET(1.25) Net::NNTP>>> IO::Socket(1.26) Net::NNTP>>> IO::Handle(1.21) Net::NNTP=GLOB(0x8262444)<<< 200 Welcome to BigPond Broadband - http:/ +/www.telstra.com/ (Typhoon v2.0.4.336) Net::NNTP=GLOB(0x8262444)>>> MODE READER Net::NNTP=GLOB(0x8262444)<<< 200 Welcome to BigPond Broadband - http:/ +/www.telstra.com/ (Typhoon v2.0.4.336) 61.9.191.5 Net::NNTP=GLOB(0x8262444)>>> QUIT Net::NNTP=GLOB(0x8262444)<<< 205 GoodBye

Furthermore, I would recommend comparing the return result of the connected method with the socket status as reported by operating system tools such as netstat - The usage of this tool to show the status of established TCP sockets would be netstat -t under Linux and netstat -p tcp under Windows.

 

perl -le "print+unpack'N',pack'B32','00000000000000000000001010100110'"


In reply to Re: Re: Re: Net::NNTP ping? by rob_au
in thread Net::NNTP ping? by akis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-03-30 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found