ライブラリ
- ビルトイン (6)
- mkmf (2)
-
rdoc
/ context (1) - socket (7)
-
win32
/ registry (2)
クラス
- File (3)
- Module (2)
- Object (1)
-
RDoc
:: Context (1) - Socket (1)
-
Socket
:: AncillaryData (6) -
Win32
:: Registry (2)
モジュール
- Kernel (2)
キーワード
-
class
_ variables (1) -
connect
_ nonblock (1) -
convertible
_ int (2) - flock (1)
-
instance
_ variables (1) -
ip
_ pktinfo (1) -
ipv6
_ pktinfo (1) -
ipv6
_ pktinfo _ addr (1) -
ipv6
_ pktinfo _ ifindex (1) - path (1)
- read (1)
-
to
_ path (1) -
unix
_ rights (1) - write (1)
検索結果
先頭5件
-
Module
# constants(inherit = true) -> [Symbol] (63787.0) -
そのモジュール(またはクラス)で定義されている定数名の配列を返します。
そのモジュール(またはクラス)で定義されている定数名の配列を返します。
inherit に真を指定すると
スーパークラスやインクルードしているモジュールの定数も含みます。
Object のサブクラスの場合、Objectやそのスーパークラスで定義されている
定数は含まれません。 Object.constants とすると Object クラスで定義された
定数の配列が得られます。
得られる定数の順序は保証されません。
@param inherit true を指定するとスーパークラスや include したモジュールで
定義された定数が対象にはなります。false を指定し... -
RDoc
:: Context # constants -> [RDoc :: Constant] (63307.0) -
追加された RDoc::Constant の配列を返します。
追加された RDoc::Constant の配列を返します。 -
Kernel
# convertible _ int(type , headers = nil , opts = nil) (27652.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Kernel
# convertible _ int(type , headers = nil , opts = nil) { . . . } (27652.0) -
Returns the convertible integer type of the given +type+. You may optionally specify additional +headers+ to search in for the +type+. _Convertible_ means actually same type, or typedefed from same type. If the +type+ is a integer type and _convertible_ type is found, following macros are passed as preprocessor constants to the compiler using the +type+ name, in uppercase. * 'TYPEOF_', followed by the +type+ name, followed by '=X' where 'X' is the found _convertible_ type name. * 'TYP2NUM' and 'NUM2TYP, where 'TYP' is the +type+ name in uppercase with replacing '_t' suffix with 'T', followed by '=X' where 'X' is the macro name to convert +type+ to +Integer+ object, and vice versa. For example, if foobar_t is defined as unsigned long, then convertible_int("foobar_t") would return "unsigned long", and define macros: #define TYPEOF_FOOBAR_T unsigned long #define FOOBART2NUM ULONG2NUM #define NUM2FOOBART NUM2ULONG
Returns the convertible integer type of the given +type+. You may
optionally specify additional +headers+ to search in for the +type+.
_Convertible_ means actually same type, or typedefed from same type.
If the +type+ is a integer type and _convertible_ type is found,
following macros are p... -
Socket
:: AncillaryData # timestamp -> Time (18412.0) -
タイムスタンプ制御メッセージに含まれる時刻を Time オブジェクト で返します。
タイムスタンプ制御メッセージに含まれる時刻を Time オブジェクト
で返します。
"タイムスタンプ制御メッセージ" は以下のいずれかです。
* SOL_SOCKET/SCM_TIMESTAMP (micro second) GNU/Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X
* SOL_SOCKET/SCM_TIMESTAMPNS (nano second) GNU/Linux
* SOL_SOCKET/SCM_BINTIME (2**(-64) second) FreeBSD
require 'socket... -
Module
# class _ variables(inherit = true) -> [Symbol] (18340.0) -
クラス/モジュールに定義されているクラス変数の名前の配列を返します。
クラス/モジュールに定義されているクラス変数の名前の配列を返します。
@param inherit false を指定しない場合はスーパークラスやインクルードして
いるモジュールのクラス変数を含みます。
//emlist[例][ruby]{
class One
@@var1 = 1
end
class Two < One
@@var2 = 2
end
One.class_variables # => [:@@var1]
Two.class_variables # => [:@@var2, :@@var1]
Two.class_va... -
Object
# instance _ variables -> [Symbol] (18340.0) -
オブジェクトのインスタンス変数名をシンボルの配列として返します。
オブジェクトのインスタンス変数名をシンボルの配列として返します。
//emlist[][ruby]{
obj = Object.new
obj.instance_eval { @foo, @bar = nil }
p obj.instance_variables
#=> [:@foo, :@bar]
//}
@see Object#instance_variable_get, Kernel.#local_variables, Kernel.#global_variables, Module.constants, Module#constants, Module#class_variabl... -
Socket
# connect _ nonblock(server _ sockaddr) -> 0 (18322.0) -
ソケットをノンブロッキングモードに設定した後、 connect(2) を呼び出します。
ソケットをノンブロッキングモードに設定した後、
connect(2) を呼び出します。
引数、返り値は Socket#connect と同じです。
connect が EINPROGRESS エラーを報告した場合、その例外(Errno::EINPROGRESS)
には IO::WaitWritable が Object#extend されます。
これを connect_nonblock をリトライするために使うことができます。
# Pull down Google's web page
require 'socket'
include Socket::Constants
... -
Socket
:: AncillaryData # ipv6 _ pktinfo _ ifindex -> Integer (18322.0) -
自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) のインデックスを返します。
自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
のインデックスを返します。
require 'socket'
addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo_ifindex #=> 0
@see Socket::AncillaryData.ipv6_pktinfo,
Socket::Anc... -
Win32
:: Registry # read(name , *rtype) (18322.0) -
@todo
@todo
レジストリ値 name を読み,[ type, data ]
の配列で返します。
name が nil の場合,(標準) レジストリ値が読み込まれます。
type はレジストリ値の型です。(⇒Win32::Registry::Constants)
data はレジストリ値のデータで,クラスは以下の通りです:
* REG_SZ, REG_EXPAND_SZ
String
* REG_MULTI_SZ
String の配列
* REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_QWORD
Integer
* REG_B... -
Win32
:: Registry # write(name , type , data) (18322.0) -
@todo
@todo
レジストリ値 name に型 type で data を書き込みます。
name が nil の場合,(標準) レジストリ値に書き込みます。
type はレジストリ値の型です。(⇒Win32::Registry::Constants)
data のクラスは Win32::Registry#read
メソッドに準じていなければなりません。 -
File
# flock(operation) -> 0 | false (9340.0) -
ファイルをロックします。
ファイルをロックします。
ロックを取得するまでブロックされます。
ロックの取得に成功した場合は 0 を返します。
File::LOCK_NB (ノンブロッキング) を指定すると、本来ならブロックされる場合に
ブロックされずに false を返すようになります。
@param operation ロックに対する操作の種類を示す定数を指定します。
どのような定数が利用可能かは以下を参照して下さい。
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX operation に不正な整数を与えた... -
Socket
:: AncillaryData # ip _ pktinfo -> [Addrinfo , Integer , Addrinfo] (9322.0) -
自身の type が IP_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス、ローカルアドレス) を3要素の配列で返します。
自身の type が IP_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス、ローカルアドレス)
を3要素の配列で返します。
IP_PKTINFO は非標準的拡張であり、システムによっては使えない場合があります。
require 'socket'
addr = Addrinfo.ip("127.0.0.1")
ifindex = 0
spec_dest = Addrinfo.ip("127.0.0.1")
ancdata = Socket::AncillaryData.ip_pktinfo(addr, ifindex, spe... -
Socket
:: AncillaryData # ipv6 _ pktinfo -> [Addrinfo , Integer] (9322.0) -
自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) を2要素の配列で返します。
自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
を2要素の配列で返します。
IPV6_PKTINFO については 3542 を参照してください。
require 'socket'
addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo #=> [#<Addrinfo: ::1>, 0]
@see Socke... -
File
# path -> String (9022.0) -
オープン時に使用したパスを文字列で返します。
オープン時に使用したパスを文字列で返します。
パスは self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたりする場合です。
@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f... -
File
# to _ path -> String (9022.0) -
オープン時に使用したパスを文字列で返します。
オープン時に使用したパスを文字列で返します。
パスは self に対応するファイルを指しているとは限りません。
たとえば、ファイルが移動されていたり、削除されていたりする場合です。
@raise IOError TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f... -
Socket
:: AncillaryData # ipv6 _ pktinfo _ addr -> Addrinfo (9022.0) -
自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) のアドレスを返します。
自身の type が IPV6_PKTINFO である場合、保持しているデータ
(アドレス、インターフェースのインデックス)
のアドレスを返します。
require 'socket'
addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo_addr #=> #<Addrinfo: ::1>
@see Socket::AncillaryData.ipv6_pktinfo,
S... -
Socket
:: AncillaryData # unix _ rights -> [IO] | nil (9022.0) -
Unix domain socket の SCM_RIGHTS 制御メッセージに含まれる ファイルディスクリプタを IO オブジェクトの配列として返します。
Unix domain socket の SCM_RIGHTS 制御メッセージに含まれる
ファイルディスクリプタを IO オブジェクトの配列として返します。
得られる IO オブジェクトか IO か Socket です。
この配列は Socket::AncillaryData が初期化されたときに
作られます。例えば BasicSocket#recvmsg を :scm_rights => true
オプションを付けて呼びだし、
SCM_RIGHTS な 制御メッセージを受け取ったときに配列が作られます。
適切なオプションを指定しなかった場合は配列は生成されず、
このメソッドは nil...