るりまサーチ

最速Rubyリファレンスマニュアル検索!
819件ヒット [201-300件を表示] (0.095秒)
トップページ > クエリ:t[x] > クエリ:echo[x]

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

クラス

モジュール

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Socket.udp_server_sockets(host, port) -> [Sockets] (6206.0)

UDP で host:port を待ち受けるサーバ側のソケットを作成します。

...UDP で host:port を待ち受けるサーバ側のソケットを作成します。

ブロックなしの場合は、ソケットオブジェクトの配列を返します。

ブロック付きの場合は、ソケットオブジェクトをそのブロックに
渡して呼び出します。ブ...
...

port が 0 の場合は、実際のポート番号は動的に選ばれます。
ただし返り値のソケットはすべて同じ番号を持ちます。

# UDP/IP echo server
require 'socket'

Socket.udp_server_sockets(0) {|sockets|
p sockets.first.local_address.ip_port #=> 32...
...963
Socket.udp_server_loop_on(sockets) {|msg, msg_src|
msg_src.reply msg
}
}

@param host 割り当てるホスト名
@param port 割り当てるポート番号...

Socket.udp_server_sockets(host, port) {|sockets| ... } -> object (6206.0)

UDP で host:port を待ち受けるサーバ側のソケットを作成します。

...UDP で host:port を待ち受けるサーバ側のソケットを作成します。

ブロックなしの場合は、ソケットオブジェクトの配列を返します。

ブロック付きの場合は、ソケットオブジェクトをそのブロックに
渡して呼び出します。ブ...
...

port が 0 の場合は、実際のポート番号は動的に選ばれます。
ただし返り値のソケットはすべて同じ番号を持ちます。

# UDP/IP echo server
require 'socket'

Socket.udp_server_sockets(0) {|sockets|
p sockets.first.local_address.ip_port #=> 32...
...963
Socket.udp_server_loop_on(sockets) {|msg, msg_src|
msg_src.reply msg
}
}

@param host 割り当てるホスト名
@param port 割り当てるポート番号...

Socket.udp_server_sockets(port) -> [Sockets] (6206.0)

UDP で host:port を待ち受けるサーバ側のソケットを作成します。

...UDP で host:port を待ち受けるサーバ側のソケットを作成します。

ブロックなしの場合は、ソケットオブジェクトの配列を返します。

ブロック付きの場合は、ソケットオブジェクトをそのブロックに
渡して呼び出します。ブ...
...

port が 0 の場合は、実際のポート番号は動的に選ばれます。
ただし返り値のソケットはすべて同じ番号を持ちます。

# UDP/IP echo server
require 'socket'

Socket.udp_server_sockets(0) {|sockets|
p sockets.first.local_address.ip_port #=> 32...
...963
Socket.udp_server_loop_on(sockets) {|msg, msg_src|
msg_src.reply msg
}
}

@param host 割り当てるホスト名
@param port 割り当てるポート番号...

Socket.udp_server_sockets(port) {|sockets| ... } -> object (6206.0)

UDP で host:port を待ち受けるサーバ側のソケットを作成します。

...UDP で host:port を待ち受けるサーバ側のソケットを作成します。

ブロックなしの場合は、ソケットオブジェクトの配列を返します。

ブロック付きの場合は、ソケットオブジェクトをそのブロックに
渡して呼び出します。ブ...
...

port が 0 の場合は、実際のポート番号は動的に選ばれます。
ただし返り値のソケットはすべて同じ番号を持ちます。

# UDP/IP echo server
require 'socket'

Socket.udp_server_sockets(0) {|sockets|
p sockets.first.local_address.ip_port #=> 32...
...963
Socket.udp_server_loop_on(sockets) {|msg, msg_src|
msg_src.reply msg
}
}

@param host 割り当てるホスト名
@param port 割り当てるポート番号...

IO#noecho {|io| ... } -> object (6200.0)

文字入力時のエコーバックを無効に設定してブロックを評価します。

...す。ブロックを評価した結果を返します。

以下の例では、標準入力からエコーバックなしで文字列を一行読み込みます。

require "io/console"
STDIN.noecho(&:gets)

@raise LocalJumpError ブロックを指定しなかった場合に発生します。...

絞り込み条件を変える

ARGF.class#gets(limit) -> String | nil (6124.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...imit 最大の読み込みバイト数


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets # => "line1\n"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets(...
...# => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") #...
...=> "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(limit, chomp: false) -> String | nil (6124.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...ド)。

@param limit 最大の読み込みバイト数

@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets...
...$ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo...
..."line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(rs = $/) -> String | nil (6124.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...imit 最大の読み込みバイト数


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets # => "line1\n"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets(...
...# => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") #...
...=> "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(rs = $/, chomp: false) -> String | nil (6124.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...ド)。

@param limit 最大の読み込みバイト数

@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets...
...$ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo...
..."line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#gets(rs, limit) -> String | nil (6124.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...imit 最大の読み込みバイト数


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets # => "line1\n"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets(...
...# => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") #...
...=> "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

絞り込み条件を変える

ARGF.class#gets(rs, limit, chomp: false) -> String | nil (6124.0)

ARGFの現在位置から一行ずつ文字列として読み込みます。EOF に到達した時に は nil を返します。

...ド)。

@param limit 最大の読み込みバイト数

@param chomp true を指定すると各行の末尾から "\n", "\r", または "\r\n" を取り除きます。

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets...
...$ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets(2) # => "li"

例:
# $ echo "line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("e") # => "line"


例:
# $ echo...
..."line1\nline2\nline3\n\nline4\n" > test.txt
# $ ruby test.rb test.txt

# test.rb
ARGF.gets("") # => "line1\nline2\nline3\n\n"

@see Kernel.#gets, IO#gets, ARGF.class#getbyte, ARGF.class#getc...

ARGF.class#each_codepoint -> Enumerator (6112.0)

self の各コードポイントに対して繰り返しブロックを呼びだします。

...場合には、Enumerator を返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,...

ARGF.class#each_codepoint { |c| ... } -> self (6112.0)

self の各コードポイントに対して繰り返しブロックを呼びだします。

...場合には、Enumerator を返します。

例:
# $ echo "line1\n" > test1.txt
# $ echo "line2\n" > test2.txt
# $ ruby test.rb test1.txt test2.txt

# test.rb
ARGF.each_codepoint # => #<Enumerator: ARGF:each_codepoint>
ARGF.each_codepoint{|e|print e, ","} # => 108,105,...
<< < 1 2 3 4 5 ... > >>