るりまサーチ

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

別のキーワード

  1. etc sc_xopen_enh_i18n
  2. rsa n=
  3. rsa n
  4. openssl n
  5. openssl n=

検索結果

<< < ... 6 7 8 >>

OpenSSL::SSL::SSLSocket#peer_cert -> OpenSSL::X509::Certificate | nil (3107.0)

接続相手の証明書オブジェクトを返します。

...接続相手の証明書オブジェクトを返します。

OpenSSL::SSL::SSLSocket#connect や OpenSSL::SSL::SSLSocket#accept
で SSL/TLS ハンドシェイクを行う前にこのメソッドを呼ぶと nil を返します。

@see OpenSSL::SSL::SSLSocket#peer_cert_chain...

UNIXSocket#recvfrom(maxlen, flags = 0) -> [String [String, String]] (3107.0)

recvfrom(2) を用いてソケットからメッセージを受け取ります。

...maxlen で受け取るメッセージの最大長をバイト数で指定します。

flags には Socket::MSG_* という名前の定数の bitwise OR を渡します。

戻り値は文字列と相手ソケットのパスのペアです。

例:

require 'socket'

UNIXServer.open("/tmp/s")...
...{|serv|
c = UNIXSocket.open("/tmp/s")
s = serv.accept
s.send "a", 0
p c.recvfrom(10)[0] #=> "a"
}

@param maxlen 受け取るメッセージの最大長
@param flags フラグ...

OpenSSL::SSL::SSLServer#start_immediately=(bool) (3045.0)

OpenSSL::SSL::SSLServer#accept で accept したらすぐに TLS/SSL ハンドシェイクを実行するかどうかを設定します。

...OpenSSL::SSL::SSLServer#accept
accept
したらすぐに TLS/SSL ハンドシェイクを実行するかどうかを設定します。

これを真に設定した場合は、OpenSSL::SSL::SSLServer#accept
接続したソケットに対し OpenSSL::SSL::SSLSocket#accept
呼び、ハン...
...ドシェイクを実行します。

デフォルトでは true です。

@param bool 設定する真偽値。
@see OpenSSL::SSL::SSLServer#start_immediately...

OpenSSL::SSL::SSLServer#start_immediately -> bool (3033.0)

OpenSSL::SSL::SSLServer#accept で accept したらすぐに TLS/SSL ハンドシェイクを実行するかどうかを返します。

...OpenSSL::SSL::SSLServer#accept
accept
したらすぐに TLS/SSL ハンドシェイクを実行するかどうかを返します。

@see OpenSSL::SSL::SSLServer#start_immediately=...

OptionParser#reject(klass) -> () (3023.0)

OptionParser#accept で登録したクラスとブロックを 自身から削除します。

...OptionParser#accept で登録したクラスとブロックを
自身から削除します。

@param klass 自身から削除したいクラスを指定します。

//emlist[例][ruby]{
require "optparse"
require "time"

def parse(option_parser)
option_parser.on("-t", "--time [TIME]", Time) do...
...me.class
end
option_parser.parse(ARGV)
end

opts = OptionParser.new
opts.accept(Time) do |s,|
begin
Time.parse(s) if s
rescue
raise OptionParser::InvalidArgument, s
end
end

parse(opts) # => Time
opts.reject(Time)
parse(opts) # => unsupported argument type: Time (ArgumentError)
//}...

絞り込み条件を変える

Module#ruby2_keywords(method_name, ...) -> nil (117.0)

For the given method names, marks the method as passing keywords through a normal argument splat. This should only be called on methods that accept an argument splat (`*args`) but not explicit keywords or a keyword splat. It marks the method such that if the method is called with keyword arguments, the final hash argument is marked with a special flag such that if it is the final element of a normal argument splat to another method call, and that method call does not include explicit keywords or a keyword splat, the final element is interpreted as keywords. In other words, keywords will be passed through the method to other methods.

...ven method names, marks the method as passing keywords through
a normal argument splat. This should only be called on methods that
accept
an argument splat (`*args`) but not explicit keywords or a
keyword splat. It marks the method such that if the method is called
with keyword arguments, the fina...
...l hash argument is marked with a special
flag such that if it is the final element of a normal argument splat to
another method call, and that method call does not include explicit
keywords or a keyword splat, the final element is interpreted as
keywords. In other words, keywords will be passed thro...
...This should only be used for methods that delegate keywords to another
method, and only for backwards compatibility with Ruby versions before
2.7.

This method will probably be removed at some point, as it exists only
for backwards compatibility. As it does not exist in Ruby versions
before 2.7, c...

BasicSocket#getsockopt(level, optname) -> Socket::Option (107.0)

ソケットのオプションを取得します。getsockopt(2) を参照してください。 取得したオプションのデータを Socket::Option で返します。

...プションを取得します。getsockopt(2)
を参照してください。
取得したオプションのデータを Socket::Option で返します。

level, optname には Socket::SOL_SOCKET や Socket::SO_REUSEADDR
といった整数値の他、文字列("SOL_SOCKET", prefixなしの "SOCKET...
...optname getsockopt(2) の 第三引数のoption_name
@see BasicSocket#setsockopt

例:

require 'socket'

serv = Socket.tcp_server_sockets("", 0)[0]
c = serv.local_address.connect
s = serv.accept
opt = c.getsockopt(Socket::IPPROTO_TCP, Socket::TCP_NODELAY)
# c.getsockopt("TCP", "NODEL...
...
p opt #=> #<Socket::Option: INET TCP NODELAY 0>
p opt.bool #=> false (Nagle アルゴリズム有効)
p opt.unpack("i")[0] #=> 0 (Socket::Option#unpack が互換性のために存在する)
# 整数値の場合は Socket::Option#int を用いる
p c.getsockopt(:IP, :TTL).int #=> 64...

BasicSocket#remote_address -> Addrinfo (107.0)

getpeername(2) で得られたリモートアドレス情報を Addrinfo オブジェクトとして返します。

...getpeername(2) で得られたリモートアドレス情報を
Addrinfo オブジェクトとして返します。

返されたオブジェクトの Addrinfo#protocol は 0 を
返すことに注意してください。

require 'socket'

TCPSocket.open("www.ruby-lang.org", 80) {|s|
p s.re...
...mote_address #=> #<Addrinfo: 221.186.184.68:80 TCP>
}

TCPServer.open("127.0.0.1", 1728) {|serv|
c = TCPSocket.new("127.0.0.1", 1728)
s = serv.accept
p s.remote_address #=> #<Addrinfo: 127.0.0.1:36504 TCP>
}

@see BasicSocket#getpeername...

RDoc::Markup#add_special(pattern, name) -> () (107.0)

pattern で指定した正規表現にマッチする文字列をフォーマットの対象にしま す。

...pattern で指定した正規表現にマッチする文字列をフォーマットの対象にしま
す。

例えば WikiWord のような、SM::SimpleMarkup#add_word_pair、
SM::SimpleMarkup#add_html でフォーマットできないものに対して使用
します。

@param pattern 正規...
...aram name SM::ToHtml などのフォーマッタに識別させる時の名前を
Symbol で指定します。

例:

require 'rdoc/markup/simple_markup'
require 'rdoc/markup/simple_markup/to_html'

class WikiHtml < SM::ToHtml
def handle_special_WIKIWORD(special)
"<font c...
...or=red>" + special.text + "</font>"
end
end

m = SM::SimpleMarkup.new
m.add_special(/\b([A-Z][a-z]+[A-Z]\w+)/, :WIKIWORD)

h = WikiHtml.new
puts m.convert(input_string, h)

変換時に実際にフォーマットを行うには SM::ToHtml#accept_special_<name で指定した名前>
...
<< < ... 6 7 8 >>