Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: use telnet to connect to tcp session and receive data

by dave0 (Friar)
on Jun 22, 2005 at 14:30 UTC ( #469038=note: print w/replies, xml ) Need Help??


in reply to use telnet to connect to tcp session and receive data

Unless you're connecting to an actual Telnet server, you should probably use IO::Socket::INET.
  • Comment on Re: use telnet to connect to tcp session and receive data

Replies are listed 'Best First'.
Re^2: use telnet to connect to tcp session and receive data
by derby (Abbot) on Jun 22, 2005 at 14:51 UTC

    Not really. From the Net::Telnet:

    Other reasons to use this module than strictly with a TEL­NET port are:
    
      · You're not familiar with sockets and you want a simple way to make client connections to TCP services.
      
      · You want to be able to specify your own time-out while connecting, reading, or writing.
    
      · You're communicating with an interactive program at the other end of some socket or pipe and you want to wait for certain patterns to appear.
    

    When debugging, I use the command line telnet to connect to all types of servers (http, smtp, etc). There's no reason why you cannot use Net::Telnet the same way.

    -derby
      yea.. I figured.. either works however when I use a simple inet socket connection there's a lot of garbage in front of the text which leads me to believe there are format codes in the message. Leads me to think it's in vt100 mode or something. I guess I may have to use net::telnet after all

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://469038]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2021-04-20 17:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?