84件ヒット
[1-84件を表示]
(0.054秒)
別のキーワード
ライブラリ
-
fiddle
/ import (12) -
rubygems
/ installer (36) -
rubygems
/ specification (24) - socket (12)
クラス
-
Gem
:: Installer (36) -
Gem
:: Specification (24) - UDPSocket (12)
モジュール
-
Fiddle
:: Importer (12)
キーワード
-
add
_ bindir (12) - bindir= (12)
-
generate
_ bin _ script (12) -
generate
_ bin _ symlink (12) -
generate
_ windows _ script (12) -
recvfrom
_ nonblock (12)
検索結果
先頭5件
-
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (18220.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...して定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出すことができます。
signature で関数の名前とシネグチャを指定します。例えば
"int compare(void*, void*)" のように指定します。
opts には :stdca......す。
@param signature 関数の名前とシネグチャ
@param opts オプション
例
require 'fiddle/import'
module M
extend Fiddle::Importer
dlload "libc.so.6"
typealias "size_t", "unsigned long"
extern "int qsort(void*, size_t, size_t, void*)"
bind("int compa......x.to_s(Fiddle::SIZEOF_INT).unpack("i!")
y = py.to_s(Fiddle::SIZEOF_INT).unpack("i!")
x <=> y
}
end
data = [32, 180001, -13, -1, 0, 49].pack("i!*")
M.qsort(Fiddle::Pointer[data], 6, Fiddle::SIZEOF_INT, M["compare"])
p data.unpack("i!*") # => [-13, -1, 0, 32, 49, 180001]... -
Gem
:: Specification # add _ bindir(executables) -> Array | nil (9107.0) -
実行コマンドの格納場所を返します。
...実行コマンドの格納場所を返します。
@param executables 実行コマンド名を格納した配列を指定します。... -
Gem
:: Specification # bindir=(dir) (9107.0) -
実行ファイルを格納するディレクトリをセットします。
...実行ファイルを格納するディレクトリをセットします。
@param dir 実行ファイルを格納するディレクトリを指定します。デフォルトは "bin" です。... -
Gem
:: Installer # generate _ bin _ script(filename , bindir) (6213.0) -
Gem に入っているアプリケーションを実行するためのスクリプトを作成します。
...Gem に入っているアプリケーションを実行するためのスクリプトを作成します。
@param filename ファイル名を指定します。
@param bindir 実行ファイルを配置するディレクトリを指定します。... -
Gem
:: Installer # generate _ bin _ symlink(filename , bindir) (6213.0) -
Gem に入っているアプリケーションを実行するためのシンボリックリンクを作成します。
...現在インストールされている Gem よりも新しい Gem をインストールするときは、
シンボリックリンクを更新します。
@param filename ファイル名を指定します。
@param bindir 実行ファイルを配置するディレクトリを指定します。... -
Gem
:: Installer # generate _ windows _ script(filename , bindir) (6213.0) -
コマンドの実行を容易にするために Windows 向けのバッチファイルを作成します。
...コマンドの実行を容易にするために Windows 向けのバッチファイルを作成します。
@param bindir 実行ファイルを配置するディレクトリを指定します。
@param filename ファイル名を指定します。... -
UDPSocket
# recvfrom _ nonblock(maxlen , flags=0) -> [String , Array] (37.0) -
ソケットをノンブロッキングモードに設定した後、 recvfrom(2) でソケットからデータを受け取ります。
...います。
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.values_at(3,1))
s1.send "aaa", 0
begin # 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...