73件ヒット
[1-73件を表示]
(0.023秒)
別のキーワード
ライブラリ
- ビルトイン (7)
- e2mmap (6)
-
fiddle
/ import (12) -
rubygems
/ specification (36) - socket (12)
クラス
- Binding (7)
-
Gem
:: Specification (36) - UDPSocket (12)
モジュール
- Exception2MessageMapper (6)
-
Fiddle
:: Importer (12)
キーワード
-
add
_ bindir (12) - bindir (12)
- bindir= (12)
-
recvfrom
_ nonblock (12) -
source
_ location (7)
検索結果
先頭5件
-
Exception2MessageMapper
# bind(cl) -> () (21102.0) -
@todo
@todo
@param cl xxx -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (18208.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...す。
これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。
signature で関数の名前とシネグチャを指定します。例えば
"int......:cdecl を渡すことができ、
呼出規約を明示することができます。
@return インポートした関数を表す Fiddle::Function オブジェクトを返します。
@param signature 関数の名前とシネグチャ
@param opts オプション
例
require 'fiddle/import'......extend Fiddle::Importer
dlload "libc.so.6"
typealias "size_t", "unsigned long"
extern "int qsort(void*, size_t, size_t, void*)"
bind("int compare(void*, void*)"){|px, py|
x = px.to_s(Fiddle::SIZEOF_INT).unpack("i!")
y = py.to_s(Fiddle::SIZEOF_INT).unpack("i!")... -
Binding
# source _ location -> [String , Integer] (9101.0) -
self の Ruby のソースファイル名と行番号を返します。
...self の Ruby のソースファイル名と行番号を返します。
d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。
//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}... -
Gem
:: Specification # add _ bindir(executables) -> Array | nil (9101.0) -
実行コマンドの格納場所を返します。
実行コマンドの格納場所を返します。
@param executables 実行コマンド名を格納した配列を指定します。 -
Gem
:: Specification # bindir -> String (9101.0) -
実行ファイルを格納するディレクトリを返します。
実行ファイルを格納するディレクトリを返します。 -
Gem
:: Specification # bindir=(dir) (9101.0) -
実行ファイルを格納するディレクトリをセットします。
実行ファイルを格納するディレクトリをセットします。
@param dir 実行ファイルを格納するディレクトリを指定します。デフォルトは "bin" です。 -
UDPSocket
# recvfrom _ nonblock(maxlen , flags=0) -> [String , Array] (31.0) -
ソケットをノンブロッキングモードに設定した後、 recvfrom(2) でソケットからデータを受け取ります。
...トライすることが
可能であることを意味する例外には、IO::WaitReadable が extend
されています。
require 'socket'
s1 = UDPSocket.new
s1.bind("127.0.0.1", 0)
s2 = UDPSocket.new
s2.bind("127.0.0.1", 0)
s2.connect(*s1.addr.values_at(3,1))
s1.connect(*s2.addr.......emulate blocking recvfrom
p s2.recvfrom_nonblock(10)
#=> ["aaa", ["AF_INET", 33302, "localhost.localdomain", "127.0.0.1"]]
rescue IO::WaitReadable
IO.select([s2])
retry
end
@param maxlen 受け取るデータの最大バイト数
@param flags フラグ
@see IPSocket#recvfrom...