85件ヒット
[1-85件を表示]
(0.079秒)
ライブラリ
- ビルトイン (7)
- e2mmap (6)
-
fiddle
/ import (12) -
rubygems
/ specification (36) - socket (24)
クラス
- Binding (7)
-
Gem
:: Specification (36) - UDPSocket (24)
モジュール
- Exception2MessageMapper (6)
-
Fiddle
:: Importer (12)
キーワード
-
add
_ bindir (12) - bindir (12)
- bindir= (12)
- connect (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 co......を表す Fiddle::Function オブジェクトを返します。
@param signature 関数の名前とシネグチャ
@param opts オプション
例
require 'fiddle/import'
module M
extend Fiddle::Importer
dlload "libc.so.6"
typealias "size_t", "unsigned long"
extern "int qsor......t(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!")
x <=> y
}
end
data = [32, 180001, -13, -1, 0, 49].pack("i!*")
M.qsort(Fiddle::Pointer[data],... -
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] (6113.0) -
ソケットをノンブロッキングモードに設定した後、 recvfrom(2) でソケットからデータを受け取ります。
...uire '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",... -
UDPSocket
# connect(host , port) -> 0 (6107.0) -
ソケットを host の port に connect(2) します。
...ソケットを host の port に connect(2) します。
これによって UDPSocket#send で送り先のアドレスを指定せずに
データを送ることができます(connect しなくとも送り先のアドレスを明示すれば
データを送ることができます)。
require......'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 接続するポート番号...