るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
44件ヒット [1-44件を表示] (0.050秒)

別のキーワード

  1. openssl integer
  2. asn1 integer
  3. _builtin integer
  4. integer times
  5. integer new

検索結果

Socket::AncillaryData#type -> Integer (54679.0)

自身が保持している cmsg type (種類) を返します。

...自身が保持している cmsg type (種類) を返します。

require 'socket'

p Socket::AncillaryData.new(:INET6, :IPV6, :PKTINFO, "").type
#=> 2

@see Socket::AncillaryData.new...

Socket::Constants::IPV6_RTHDR_TYPE_0 -> Integer (18661.0)

Routing header type 0。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...Routing header type 0。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542...

Socket::Constants::SO_TYPE -> Integer (18661.0)

Get the socket type。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...Get the socket type。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see sys/socket.h(header), getsockopt(2freebsd),
socket
(7linux), Socket::Constants::SOL_SOCKET...

Socket::IPV6_RTHDR_TYPE_0 -> Integer (18661.0)

Routing header type 0。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...Routing header type 0。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IPV6,
3542...

Socket::SO_TYPE -> Integer (18661.0)

Get the socket type。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...Get the socket type。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see sys/socket.h(header), getsockopt(2freebsd),
socket
(7linux), Socket::Constants::SOL_SOCKET...

絞り込み条件を変える

Socket::Constants::EAI_SOCKTYPE -> Integer (18658.0)

Socket type not supported

...Socket type not supported

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_strerror(3free...

Socket::EAI_SOCKTYPE -> Integer (18658.0)

Socket type not supported

...Socket type not supported

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_strerror(3free...

Socket::Constants::IPX_TYPE -> Integer (18613.0)

@todo

@todo

Socket::IPX_TYPE -> Integer (18613.0)

@todo

@todo

Addrinfo#socktype -> Integer (18610.0)

ソケットタイプを整数で返します。

...ソケットタイプを整数で返します。

require 'socket'

Addrinfo.tcp("localhost", 80).socktype == Socket::SOCK_STREAM #=> true...

絞り込み条件を変える

Socket::AncillaryData.int(family, cmsg_level, cmsg_type, integer) -> Socket::AncillaryData (649.0)

データとして整数を保持する Socket::AncillaryData オブジェクトを生成します。

...持する
Socket
::AncillaryData オブジェクトを生成します。

整数データのサイズおよびエンディアンは実行するホストによって異なります。

require 'socket'

p Socket::AncillaryData.int(:UNIX, :SOCKET, :RIGHTS, STDERR.fileno)
#=> #<Socket::AncillaryDa...
...ta: UNIX SOCKET RIGHTS 2>

@param family ソケットファミリー
@param cmsg_level プロトコル
@param cmsg_type 補助データの種類
@param integer データ内容

@see Socket::AncillaryData.new...

Socket.getaddrinfo(nodename, servname, family=nil, socktype=nil, protocol=nil, flags=nil) -> Array (379.0)

2553で定義された getaddrinfo() の機能を提供するクラスメソッド。この関数は gethostbyname() や getservbyname() の代わりとして用意されており、 IP のバージョンに依存しないプログラムを書くための標準的な API です。

...名を指定します。 必須引数です。 (lib:socket#host_formatを参照)

@param servname サービス名を指定します。 必須引数です。 (lib:socket#service_formatを参照)

@param family アドレスファミリー。Socket::Constants::AF_INET など、AF_ で始まる定数を...
...指定します。

@param socktype ソケットタイプ。 Socket::Constants::SOCK_STREAM など、 SOCK_ で始まる定数を指定します。

@param protocol プロトコル。Socket::Constants::IPPROTO_IP など、IPPROTO_ で始まる定数を指定します。

@param flags getaddrinfo(3)...
...数に指定する addrinfo 構造体の ai_flags メンバに相当する整数。 Socket::AI_PASSIVEなど。

@return 7つの要素からなるアドレス情報に関する配列を返します。
@raise SocketError getaddrinfo(3)がエラーを返したときに発生する例外です

@see Ad...

Socket::AncillaryData#ip_pktinfo -> [Addrinfo, Integer, Addrinfo] (376.0)

自身の type が IP_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス、ローカルアドレス) を3要素の配列で返します。

...張であり、システムによっては使えない場合があります。

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, spec_dest)
p ancdata.ip_pktinfo
#=> [#<Addrinfo:...
...127.0.0.1>, 0, #<Addrinfo: 127.0.0.1>]

@raise TypeError level, type が IPPROTO_IP, IP_PKTINFO でない場合に
発生します。
@see Socket::AncillaryData.ip_pktinfo,
Socket
::Constants::IP_PKTINFO...

Socket::AncillaryData#ipv6_pktinfo -> [Addrinfo, Integer] (358.0)

自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) を2要素の配列で返します。

...

require 'socket'

addr = Addrinfo.ip("::1")
ifindex = 0
ancdata = Socket::AncillaryData.ipv6_pktinfo(addr, ifindex)
p ancdata.ipv6_pktinfo #=> [#<Addrinfo: ::1>, 0]

@see Socket::AncillaryData.ipv6_pktinfo,
Socket
::AncillaryData#ipv6_pktinfo_addr,
Socket
::AncillaryData#ipv...
...6_pktinfo_ifindex,
Socket
::Constants::IPV6_PKTINFO...

Socket::AncillaryData#ipv6_pktinfo_ifindex -> Integer (358.0)

自身の type が IPV6_PKTINFO である場合、保持しているデータ (アドレス、インターフェースのインデックス) のインデックスを返します。

...e '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
::AncillaryData#ipv6_pktinfo,
Socket
::AncillaryData#ipv6_pktinfo_addr,
Socket
::C...

絞り込み条件を変える

Socket::Constants::EAI_SERVICE -> Integer (358.0)

Servname not supported for socket type

...Servname not supported for socket type

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_s...

Socket::Constants::IP_TOS -> Integer (358.0)

IP type-of-service。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...IP type-of-service。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd), ip(7linux)...

Socket::Constants::SOCK_DGRAM -> Integer (358.0)

データグラム通信。 Socket.open の第二引数 type に使用します。

...データグラム通信。
Socket
.open の第二引数 type に使用します。

@see socket(2), Socket.open...

Socket::Constants::SOCK_PACKET -> Integer (358.0)

デバイスレベルインターフェース。Obsoleteであり使うべきではない。 Socket.open の第二引数 type に使用します。

...デバイスレベルインターフェース。Obsoleteであり使うべきではない。
Socket
.open の第二引数 type に使用します。

@see packet(7linux), Socket.open...

Socket::Constants::SOCK_RAW -> Integer (358.0)

RAW ソケット。 Socket.open の第二引数 type に使用します。

...RAW ソケット。
Socket
.open の第二引数 type に使用します。

@see sys/socket.h(header), socket(2linux),
raw(7linux), Socket.open...

絞り込み条件を変える

Socket::Constants::SOCK_RDM -> Integer (358.0)

信頼性のあるデータグラム通信。 Socket.open の第二引数 type に使用します。

...信頼性のあるデータグラム通信。
Socket
.open の第二引数 type に使用します。

@see socket(2linux), Socket.open...

Socket::Constants::SOCK_SEQPACKET -> Integer (358.0)

固定最大長を持つストリーム通信。 Socket.open の第二引数 type に使用します。

...固定最大長を持つストリーム通信。
Socket
.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket
(2freebsd)...

Socket::Constants::SOCK_STREAM -> Integer (358.0)

ストリーム通信。 Socket.open の第二引数 type に使用します。

...ストリーム通信。
Socket
.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket
(2freebsd)...

Socket::EAI_SERVICE -> Integer (358.0)

Servname not supported for socket type

...Servname not supported for socket type

getaddrinfo(3), getnameinfo(3) などの
エラーコードです。
対応する Socket.getaddrinfo, Addrinfo.getaddrinfo などは
エラーを SocketError に変換するため、この定数は直接は利用しません。

@see getaddrinfo(3linux), gai_s...

Socket::IP_TOS -> Integer (358.0)

IP type-of-service。 BasicSocket#getsockopt, BasicSocket#setsockopt の第2引数(optname)に使用します。

...IP type-of-service。
BasicSocket#getsockopt, BasicSocket#setsockopt
の第2引数(optname)に使用します。

@see Socket::Constants::IPPROTO_IP,
ip(4freebsd), ip(7linux)...

絞り込み条件を変える

Socket::SOCK_DGRAM -> Integer (358.0)

データグラム通信。 Socket.open の第二引数 type に使用します。

...データグラム通信。
Socket
.open の第二引数 type に使用します。

@see socket(2), Socket.open...

Socket::SOCK_PACKET -> Integer (358.0)

デバイスレベルインターフェース。Obsoleteであり使うべきではない。 Socket.open の第二引数 type に使用します。

...デバイスレベルインターフェース。Obsoleteであり使うべきではない。
Socket
.open の第二引数 type に使用します。

@see packet(7linux), Socket.open...

Socket::SOCK_RAW -> Integer (358.0)

RAW ソケット。 Socket.open の第二引数 type に使用します。

...RAW ソケット。
Socket
.open の第二引数 type に使用します。

@see sys/socket.h(header), socket(2linux),
raw(7linux), Socket.open...

Socket::SOCK_RDM -> Integer (358.0)

信頼性のあるデータグラム通信。 Socket.open の第二引数 type に使用します。

...信頼性のあるデータグラム通信。
Socket
.open の第二引数 type に使用します。

@see socket(2linux), Socket.open...

Socket::SOCK_SEQPACKET -> Integer (358.0)

固定最大長を持つストリーム通信。 Socket.open の第二引数 type に使用します。

...固定最大長を持つストリーム通信。
Socket
.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket
(2freebsd)...

絞り込み条件を変える

Socket::SOCK_STREAM -> Integer (358.0)

ストリーム通信。 Socket.open の第二引数 type に使用します。

...ストリーム通信。
Socket
.open の第二引数 type に使用します。

@see Socket.open, socket(2), socket(2linux),
socket
(2freebsd)...

BasicSocket#sendmsg(mesg, flags=0, dest_sockaddr=nil, *controls) -> Integer (328.0)

sendmsg(2) を用いてメッセージを送ります。

...ンブロッキング方式で通信したい
場合は BasicSocket#sendmsg_nonblock を用います。

ソケットが connection-less の場合は dest_sockaddr で
通信先のアドレスを指定しなければなりません。Socket.sockaddr_in
の返り値や Addrinfo オブジェクトを...
...ます。
Socket
::AncillaryData のインスタンスや
3要素(cmsg_level, cmsg_type, cmsg_data) の配列を用いることができます。

送ったバイト数を返します。

# UnixSocket#send_io の実装例
# use Socket::AncillaryData.
require 'socket'

ancdata = Socket::Ancill...
...aryData.int(:UNIX, :SOCKET, :RIGHTS, io.fileno)
sock.sendmsg("a", 0, nil, ancdata)

# use 3-element array.
ancdata = [:SOCKET, :RIGHTS, [io.fileno].pack("i!")]
sock.sendmsg("\0", 0, nil, ancdata)


@param mesg メッセージ文字列
@param flags フラグ(Socket::MSG_* という定数の...

Socket::Constants::SCM_BINTIME -> Integer (328.0)

Timestamp (bintime).

...Timestamp (bintime).

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg...

Socket::Constants::SCM_CREDENTIALS -> Integer (328.0)

The sender's credentials

...The sender's credentials

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData,
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(7linux)...

Socket::Constants::SCM_CREDS -> Integer (328.0)

Process credentials

...Process credentials

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData,
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(4freebsd)...

絞り込み条件を変える

Socket::Constants::SCM_RIGHTS -> Integer (328.0)

Access rights.

...Access rights.

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#unix_rights
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(7linux), unix(4freebsd),
sys/socket.h(header)...

Socket::Constants::SCM_TIMESTAMP -> Integer (328.0)

Timestamp (timeval).

...Timestamp (timeval).

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg...

Socket::Constants::SCM_TIMESTAMPNS -> Integer (328.0)

Timestamp (timespec).

...Timestamp (timespec).

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg...

Socket::SCM_BINTIME -> Integer (328.0)

Timestamp (bintime).

...Timestamp (bintime).

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg...

Socket::SCM_CREDENTIALS -> Integer (328.0)

The sender's credentials

...The sender's credentials

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData,
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(7linux)...

絞り込み条件を変える

Socket::SCM_CREDS -> Integer (328.0)

Process credentials

...Process credentials

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData,
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(4freebsd)...

Socket::SCM_RIGHTS -> Integer (328.0)

Access rights.

...Access rights.

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#unix_rights
BasicSocket#sendmsg, BasicSocket#recvmsg,
unix(7linux), unix(4freebsd),
sys/socket.h(header)...

Socket::SCM_TIMESTAMP -> Integer (328.0)

Timestamp (timeval).

...Timestamp (timeval).

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg...

Socket::SCM_TIMESTAMPNS -> Integer (328.0)

Timestamp (timespec).

...Timestamp (timespec).

Socket
::AncillaryData の type として利用します。

@see Socket::AncillaryData, Socket::AncillaryData#timestamp
BasicSocket#sendmsg, BasicSocket#recvmsg...