270件ヒット
[201-270件を表示]
(0.043秒)
別のキーワード
ライブラリ
- ビルトイン (96)
- e2mmap (6)
- erb (24)
-
fiddle
/ import (12) -
irb
/ frame (24) -
irb
/ xmp (12) - resolv-replace (12)
-
rubygems
/ specification (12) - socket (72)
クラス
- Binding (36)
- ERB (24)
-
Gem
:: Specification (12) - IPSocket (12)
-
IRB
:: Frame (24) - Method (24)
- Module (12)
- Proc (12)
- Socket (24)
- UDPSocket (48)
- UnboundMethod (12)
モジュール
- Exception2MessageMapper (6)
-
Fiddle
:: Importer (12) - Kernel (12)
キーワード
- === (6)
- [] (6)
-
add
_ bindir (12) - binding (12)
- bottom (12)
- call (12)
- connect (12)
- eval (12)
-
instance
_ method (12) -
local
_ variable _ defined? (12) -
local
_ variable _ get (12) - recvfrom (24)
-
recvfrom
_ nonblock (12) - result (12)
- run (12)
- top (12)
- xmp (12)
検索結果
先頭5件
-
IPSocket
# recvfrom(maxlen , flags = 0) -> Array (119.0) -
recv と同様にソケットからデータを受け取りますが、 戻り値は文字列と相手ソケットのアドレス (形式は IPSocket#addr 参照) のペアです。引数につ いては BasicSocket#recv と同様です。
...@param maxlen 受け取る文字列の最大の長さを指定します。
@param flags recv(2) を参照してください。
@raise IOError
@raise Errno::EXXX recvfrom(2) がエラーになった場合などに発生します。
例:
require 'socket'
s1 = UDPSocket.new
s1.bind("0.0.0... -
Socket
# recvfrom(maxlen , flags=0) -> [String , Addrinfo] (119.0) -
ソケットからデータを受け取ります。
...::MSG_* という定数の bitwise OR を渡します。
詳しくは recvfrom(2) を参照してください。
@param maxlen ソケットから受けとるデータの最大値
@param flags フラグ
@raise Errno::EXXX recvfrom(2) がエラーを報告した場合に発生します。詳しくは......例:
require 'socket'
s1 = Socket.new(Socket::AF_INET, Socket::SOCK_DGRAM, 0)
s2 = Socket.new(Socket::AF_INET, Socket::SOCK_DGRAM, 0)
s1.bind(Socket.sockaddr_in(0, "0.0.0.0"))
s2.send("foo", 0, s1.getsockname)
mesg, sockaddr = s1.recvfrom(10)
p mesg... -
UDPSocket
# connect(host , port) -> 0 (119.0) -
ソケットを host の port に connect(2) します。
...'socket'
u1 = UDPSocket.new
u1.bind("127.0.0.1", 4913)
u2 = UDPSocket.new
u2.connect("127.0.0.1", 4913)
u2.send "uuuu", 0
p u1.recvfrom(10) #=> ["uuuu", ["AF_INET", 33230, "localhost", "127.0.0.1"]]
@param host 接続するホスト名文字列
@param port 接続するポート番号... -
Method
# ===(*args) -> object (113.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m......されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:fo... -
Method
# [](*args) -> object (113.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m......されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:fo... -
Method
# call(*args) -> object (113.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m......されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:fo... -
Method
# call(*args) { . . . } -> object (113.0) -
メソッドオブジェクトに封入されているメソッドを起動します。
...されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
@see spec/safelevel
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m......されたもので、Array#[]のような
他の [] メソッドとの意味的な関連性はありません。
@param args self に渡される引数。
@see UnboundMethod#bind_call
//emlist[例][ruby]{
class Foo
def foo(arg)
"foo called with arg #{arg}"
end
end
m = Foo.new.method(:fo... -
Module
# instance _ method(name) -> UnboundMethod (113.0) -
self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
...self のインスタンスメソッド name をオブジェクト化した UnboundMethod を返します。
@param name メソッド名を Symbol または String で指定します。
@raise NameError self に存在しないメソッドを指定した場合に発生します。
@see Module#publ......d(:do_a),
"d" => instance_method(:do_d),
"e" => instance_method(:do_e),
"v" => instance_method(:do_v)
}
def interpret(string)
string.each_char {|b| Dispatcher[b].bind(self).call }
end
end
interpreter = Interpreter.new
interpreter.interpret('dave')
# => Hello there, Dave!
//}...