2件ヒット
[1-2件を表示]
(0.068秒)
クラス
- BasicSocket (1)
- UNIXSocket (1)
キーワード
-
do
_ not _ reverse _ lookup (1) - recvfrom (1)
検索結果
先頭2件
-
BasicSocket
# do _ not _ reverse _ lookup -> bool (36646.0) -
ソケットごとのアドレスからホスト名への逆引きの設定を返します。
...きの
BasicSocket.do_not_reverse_lookup の値になります。
require 'socket'
BasicSocket.do_not_reverse_lookup = false
TCPSocket.open("www.ruby-lang.org", 80) {|sock|
p sock.do_not_reverse_lookup # => false
}
BasicSocket.do_not_reverse_lookup = true
TCPSocket.open("www.r......uby-lang.org", 80) {|sock|
p sock.do_not_reverse_lookup # => true
}
@see BasicSocket#do_not_reverse_lookup=... -
UNIXSocket
# recvfrom(maxlen , flags = 0) -> [String [String , String]] (9346.0) -
recvfrom(2) を用いてソケットからメッセージを受け取ります。
...数で指定します。
flags には Socket::MSG_* という名前の定数の bitwise OR を渡します。
戻り値は文字列と相手ソケットのパスのペアです。
例:
require 'socket'
UNIXServer.open("/tmp/s") {|serv|
c = UNIXSocket.open("/tmp/s")
s = serv.accept...