ライブラリ
-
net
/ telnet (2)
検索結果
先頭1件
-
Net
:: Telnet (13.0) -
このクラスは telnet のクライアント機能を提供します。
...ンプトが出るまで待ち合わせる
telnet.cmd("ls") {|c| print c}
# sleep で 5 秒
telnet.cmd("sleep 5 && echo foobar &") {|c| print c}
STDOUT.flush # <- これがないとここまで処理が来てることがわかりにくい
# 前のコマンドの出力を待ち合......すべて標準出力に表示
require 'net/telnet'
# リモートホスト(POPサーバ) "foobar" に接続
# ポート番号は110(POPのwell-knownポート)、
# "Telnetmode" は off (telnet用の特殊なバイト列を解釈しない)、
# Prompt (コマンドの区切り) は POP...