るりまサーチ

最速Rubyリファレンスマニュアル検索!
216件ヒット [201-216件を表示] (0.204秒)

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. argf.class to_a

ライブラリ

クラス

モジュール

検索結果

<< < 1 2 3 >>

Socket#connect_nonblock(server_sockaddr) -> 0 (107.0)

ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。

...IO::WaitWritable が Object#extend されます。
これを connect_nonblock をリトライするために使うことができます。

# Pull down Google's web page
require 'socket'
include Socket::Constants
socket = Socket.new(AF_INET, SOCK_STREAM, 0)
sockaddr = Socket.sockaddr_in(8...
...0, 'www.google.com')
begin # emulate blocking connect
socket.connect_nonblock(sockaddr)
rescue IO::WaitWritable
IO.select(nil, [socket]) # wait 3-way handshake completion
begin
socket.connect_nonblock(sockaddr) # check connection failure
rescue Errno::EISCONN
end
end...
...socket.write("GET / HTTP/1.0\r\n\r\n")
results = socket.read



@param server_sockaddr 接続先アドレス
@raise Errno::EXXX connect(2) がエラーを報告した場合に発生します。詳しくは
man を参照してください。...

Win32::Registry#write(name, type, data) (107.0)

@todo

...@todo

レジストリ値 name に型 type で data を書き込みます。
name が nil の場合,(標準) レジストリ値に書き込みます。

type はレジストリ値の型です。(⇒Win32::Registry::Constants)
data のクラスは Win32::Registry#read
メソッドに準じていな...
<< < 1 2 3 >>