85件ヒット
[1-85件を表示]
(0.269秒)
ライブラリ
- ビルトイン (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) -> () (24102.0) -
@todo
...@todo
@param cl xxx... -
Fiddle
:: Importer # bind(signature , *opts) { . . . } -> Fiddle :: Function (21314.0) -
Ruby のブロックを C の関数で wrap し、その関数をモジュールに インポートします。
...Ruby のブロックを C の関数で wrap し、その関数をモジュールに
インポートします。
これでインポートされた関数はモジュール関数として定義されます。
また、Fiddle::Importer#[] で Fiddle::Function オブジェクトとして
取り出す......ば
"int compare(void*, void*)" のように指定します。
opts には :stdcall もしくは :cdecl を渡すことができ、
呼出規約を明示することができます。
@return インポートした関数を表す Fiddle::Function オブジェクトを返します。
@param signatu......グチャ
@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 compare(void*, void*)"){|px, py|
x = px.to_s(Fid... -
Gem
:: Specification # add _ bindir(executables) -> Array | nil (12101.0) -
実行コマンドの格納場所を返します。
...実行コマンドの格納場所を返します。
@param executables 実行コマンド名を格納した配列を指定します。... -
Gem
:: Specification # bindir -> String (12101.0) -
実行ファイルを格納するディレクトリを返します。
実行ファイルを格納するディレクトリを返します。 -
Gem
:: Specification # bindir=(dir) (12101.0) -
実行ファイルを格納するディレクトリをセットします。
...実行ファイルを格納するディレクトリをセットします。
@param dir 実行ファイルを格納するディレクトリを指定します。デフォルトは "bin" です。... -
UDPSocket
# connect(host , port) -> 0 (9213.0) -
ソケットを host の port に connect(2) します。
... port に connect(2) します。
これによって UDPSocket#send で送り先のアドレスを指定せずに
データを送ることができます(connect しなくとも送り先のアドレスを明示すれば
データを送ることができます)。
require 'socket'
u1 = UDPSock......et.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 接続するポート番号... -
UDPSocket
# recvfrom _ nonblock(maxlen , flags=0) -> [String , Array] (9119.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... -
Binding
# source _ location -> [String , Integer] (9107.0) -
self の Ruby のソースファイル名と行番号を返します。
...self の Ruby のソースファイル名と行番号を返します。
d:spec/variables#pseudo の __FILE__ と __LINE__ も参照してください。
//emlist[例][ruby]{
p binding.source_location # => ["test.rb", 1]
//}...