diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-04-16 06:03:36 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-04-16 06:03:36 +0000 |
commit | bcab5ca9d1b50cc940d3c2cf190c6ef18a20f3d0 (patch) | |
tree | fbb231b10c7092bef845762c8ea4434e851088a6 /lib/telnet.rb | |
parent | f96faa860bfaf119ed379db160c24bd815376fd1 (diff) |
prepare to alpha
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/telnet.rb')
-rw-r--r-- | lib/telnet.rb | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/telnet.rb b/lib/telnet.rb index 098cbc9772..a84180365b 100644 --- a/lib/telnet.rb +++ b/lib/telnet.rb @@ -2,7 +2,7 @@ = simple telnet cliant library -telnet.rb ver0.162 1999/03/18 +telnet.rb ver0.163 1999/04/11 Wakou Aoyama <wakou@fsinet.or.jp> @@ -30,6 +30,17 @@ if set "Telnetmode" option FALSE. not TELNET command interpretation. the same character as "Prompt" is included in the data, and, when the network or the host is very heavy, the value is enlarged. +=== status output + + host = Telnet.new({"Hosh" => "localhost"){|c| print c } + +connection status output. + +example + +Trying localhost... +Connected to localhost. + == waitfor (wait for match) @@ -133,6 +144,9 @@ of cource, set sync=TRUE or flush is necessary. = history +ver0.163 1999/04/11 +STDOUT.write(message) --> yield(message) if iterator? + ver0.162 1999/03/17 add "Proxy" option required timeout.rb @@ -291,7 +305,7 @@ class Telnet < SimpleDelegator end else message = "Trying " + @options["Host"] + "...\n" - STDOUT.write(message) + yield(message) if iterator? @log.write(message) if @options.include?("Output_log") @dumplog.write(message) if @options.include?("Dump_log") @@ -310,7 +324,7 @@ class Telnet < SimpleDelegator @sock.binmode message = "Connected to " + @options["Host"] + ".\n" - STDOUT.write(message) + yield(message) if iterator? @log.write(message) if @options.include?("Output_log") @dumplog.write(message) if @options.include?("Dump_log") end |