57件ヒット
[1-57件を表示]
(0.016秒)
モジュール
- Timeout (21)
キーワード
- SSLSocket (12)
-
ruby 1
. 6 feature (12) - timeout (21)
検索結果
先頭5件
-
TCPSocket (38012.0)
-
インターネットドメインのストリーム型ソケットのクラスです。
...をそのままサーバに転送するプログラムは以下の
ようになります。
require "socket"
port = if ARGV.size > 0 then ARGV.shift else 4444 end
print port, "\n"
s = TCPSocket.open("localhost", port)
while gets
s.write($_)
print(s.gets)
end
s.close... -
ruby 1
. 6 feature (48.0) -
ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。
...IO#close
双方向のパイプの dup を close_write するとエラーになっていました。
((<ruby-dev:17155>))
open("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end
}
=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_w......seek は、変わらず self を返します)
* Dir.glob がブロックを伴うとき nil を返すようになった(以前は false)
* IO#close がクローズ済みな IO に対して IOError を起こすようになった。
* IO#each_byte が self を返すようになった(以前......~ "foobar"
=> ruby 1.6.4 (2001-06-04) [i586-linux]
0
=> ruby 1.6.4 (2001-08-23) [i586-linux]
nil
: ((<TCPSocket>)).open
((<Cygwin>)) で ((<TCPSocket>)).open がタイミングによってエラー(Errno::EINVAL,
EALREADY)になることがある問題に対処しまし... -
OpenSSL
:: SSL :: SSLSocket (18.0) -
ソケットをラップして SSL での認証と暗号通信を実現するためのクラスです。
...de OpenSSL
soc = TCPSocket.new('www.example.com', 443)
ssl = SSL::SSLSocket.new(soc)
ssl.connect
ssl.post_connection_check('www.example.com')
raise "verification error" if ssl.verify_result != OpenSSL::X509::V_OK
ssl.write('hoge')
print ssl.peer_cert.to_text
ssl.close
soc.close... -
Timeout
. # timeout(sec , exception _ class = nil) {|i| . . . } -> object (12.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...例 timeout が割り込めない
require 'timeout'
require 'socket'
t = 0.1
start = Time.now
begin
Timeout.timeout(t) {
p TCPSocket.gethostbyname("www.ruby-lang.org")
# (A)
}
ensure
p Time.now - start
end
# 実行例
=> ["helium.ruby-lang.org", [], 2, "2......id
while line = com.gets
print line
end
}
rescue Timeout::Error => err
puts "timeout: shell execution."
Process.kill('SIGINT', pid)
printf "[result]\t%s", com.read
com.close unless com.nil?
end
#止まっているか確認する。
#system("ps au")... -
Timeout
. # timeout(sec , exception _ class , message) {|i| . . . } -> object (12.0) -
ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。
...例 timeout が割り込めない
require 'timeout'
require 'socket'
t = 0.1
start = Time.now
begin
Timeout.timeout(t) {
p TCPSocket.gethostbyname("www.ruby-lang.org")
# (A)
}
ensure
p Time.now - start
end
# 実行例
=> ["helium.ruby-lang.org", [], 2, "2......id
while line = com.gets
print line
end
}
rescue Timeout::Error => err
puts "timeout: shell execution."
Process.kill('SIGINT', pid)
printf "[result]\t%s", com.read
com.close unless com.nil?
end
#止まっているか確認する。
#system("ps au")...