るりまサーチ

最速Rubyリファレンスマニュアル検索!
98件ヒット [1-98件を表示] (0.036秒)
トップページ > クエリ:end[x] > クエリ:TCPSocket[x]

別のキーワード

  1. _builtin end
  2. ripper end_seen?
  3. _builtin exclude_end?
  4. _builtin end_with?
  5. rexml end_document

種類

ライブラリ

モジュール

検索結果

TCPSocket (38018.0)

インターネットドメインのストリーム型ソケットのクラスです。

...をそのままサーバに転送するプログラムは以下の
ようになります。

require "socket"

port = if ARGV.size > 0 then ARGV.shift else 4444 end
print port, "\n"

s = TCPSocket.open("localhost", port)

while gets
s.write($_)
print(s.gets)
end

s.close...

1.6.8から1.8.0への変更点(まとめ) (882.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...よくわかりません(^^;

class << Object
p [self.id, self]
class << self
p [self.id, self]
end

end

=> ruby 1.6.7 (2002-03-01) [i586-linux]
[537771634, Class]
[537742484, Class]
=> ruby 1.7.3 (2002-09...
...class << Object.new
class << self.superclass
p [self.id, self]
end

class << self
p [self.superclass.id, self.superclass]
end

end

=> ruby 1.6.7 (2002-03-01) [i586-linux]
[537771634, Class]
[5...
...#758>))

: ((<aStruct#inspect|Struct>)) [compat]

出力形式が少しだけ変わりました。

=== Socket

: ((<TCPSocket/TCPSocket.new>)) [compat]
: ((<TCPSocket/TCPSocket.open>)) [compat]
ローカル側アドレスを省略可能な第3,4引数で指定できるようになりまし...

ruby 1.6 feature (318.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ーになっていました。
((<ruby-dev:17155>))

open("|-","r+") {|f|
if f
f.dup.close_write
else
sleep 1
end

}

=> ruby 1.6.7 (2002-03-01) [i586-linux]
-:3:in `close_write': closing non-duplex IO for writing (IOError)
from -:3...
...トで 2 回シグナルを送らないと終了しない不具合が修正さ
れました。((<ruby-bugs-ja:PR#223>))

trap(:TERM, "EXIT")

END
{
puts "exit"
}

Thread.start { Thread.stop }
sleep

: 2002-04-17: Regexp#inspect

((<ruby-bugs-ja:PR#222>))

p %r{\/}...
...~ "foobar"
=> ruby 1.6.4 (2001-06-04) [i586-linux]
0
=> ruby 1.6.4 (2001-08-23) [i586-linux]
nil

: ((<TCPSocket>)).open

((<Cygwin>)) で ((<TCPSocket>)).open がタイミングによってエラー(Errno::EINVAL,
EALREADY)になることがある問題に対処しまし...

ruby 1.8.4 feature (66.0)

ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。

...8.4 feature/添付ライブラリ>))
* ((<ruby 1.8.4 feature/"Ruby/Tk">))
* ((<ruby 1.8.4 feature/REXML [compat]>))
* ((<ruby 1.8.4 feature/TCPSocket#initialize [bug]>))
* ((<ruby 1.8.4 feature/TCPServer#initialize [bug]>))
* ((<ruby 1.8.4 feature/"optparse">))
* ((<ruby 1.8.4 feature/"f...
...適合する文字列を厳密にした。((<ruby-core:03573>)),((<ruby-dev:27478>))

1) alias :"foo" :"bar"

def bar; p "bar"; end
alias :"foo" :"bar"
foo

# => ruby 1.8.4 (2005-12-22) [i686-linux]
-:2: syntax error, unexpecte...
..."$- "
2631438

# => ruby 1.8.4 (2005-12-22) [i686-linux]
-:2: syntax error, unexpected '(', expecting $end

#Tue Nov 1 14:20:11 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * eval.c (rb_call_super): should call method_missing if super is
#...

NEWS for Ruby 3.0.0 (54.0)

NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...> a=>1}, {}]
//}

* Arguments forwarding (`...`) now supports leading arguments.
16378

//emlist{
def method_missing(meth, ...)
send(:"do_#{meth}", ...)
end

//}

* Pattern matching (`case/in`) is no longer experimental. 17260
* One-line pattern matching is redesigned. [EXPERIMENTAL]...
..."f", 3]
in [*pre, String => x, String => y, *post]
p pre #=> ["a", 1]
p x #=> "b"
p y #=> "c"
p post #=> [2, "d", "e", "f", 3]
end

//}

* Endless method definition is added. [EXPERIMENTAL]
16746

//emlist{
def square(x) = x * x
//}

* Interpolated String literals are no long...
...t
* Update to set 1.0.0
* SortedSet has been removed for dependency and performance reasons.
* Set#join is added as a shorthand for `.to_a.join`.
* Set#<=> is added.
* Socket
* Add :connect_timeout to TCPSocket.new 17187
* Net::HTTP
* Net::HTTP#verify_hostname= and Net::H...

絞り込み条件を変える

Timeout.#timeout(sec, exception_class = nil) {|i| ... } -> object (54.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

...x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end

end


t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end


printf "%d: pi = %f\n", min[0] + min[1], min[0]*4.0/(min[0]+min[1])
#...
...ムアウト
#!/usr/bin/env ruby

require 'timeout'

class MYError < Exception;end
begin
Timeout.timeout(5, MYError) {
sleep(30)
}
rescue MYError => err
puts "MYError"
puts err
end


=== 注意

timeout による割り込みは Thread によって実現されてい...
...'timeout'
require 'socket'

t = 0.1
start = Time.now
begin
Timeout.timeout(t) {
p TCPSocket.gethostbyname("www.ruby-lang.org")
# (A)
}
ensure
p Time.now - start
end

# 実行例
=> ["helium.ruby-lang.org", [], 2, "210.251.121.214"]
0.689331
/usr/loca...

Timeout.#timeout(sec, exception_class, message) {|i| ... } -> object (54.0)

ブロックを sec 秒の期限付きで実行します。 ブロックの実行時間が制限を過ぎたときは例外 Timeout::Error が発生します。

...x = rand
y = rand
x**2 + y**2 < 1.0 ? min[0] += 1 : min[1] += 1
end

end


t = 5
min = [ 0, 0]
begin
Timeout.timeout(t){
calc_pi(min)
}
rescue Timeout::Error
puts "timeout"
end


printf "%d: pi = %f\n", min[0] + min[1], min[0]*4.0/(min[0]+min[1])
#...
...ムアウト
#!/usr/bin/env ruby

require 'timeout'

class MYError < Exception;end
begin
Timeout.timeout(5, MYError) {
sleep(30)
}
rescue MYError => err
puts "MYError"
puts err
end


=== 注意

timeout による割り込みは Thread によって実現されてい...
...'timeout'
require 'socket'

t = 0.1
start = Time.now
begin
Timeout.timeout(t) {
p TCPSocket.gethostbyname("www.ruby-lang.org")
# (A)
}
ensure
p Time.now - start
end

# 実行例
=> ["helium.ruby-lang.org", [], 2, "210.251.121.214"]
0.689331
/usr/loca...

Ruby用語集 (24.0)

Ruby用語集 A B C D E F G I J M N O R S Y

...た静的型付け言語であり、処理系はコンパイラーである。

https://ja.crystal-lang.org/

: CSI 方式
CSI は Code Set Independent の頭字語。
プログラミング言語の処理系が文字列を扱う際のエンコーディングに関する方針の一つ。
...
...ブラリー drb によって提供される分散オブジェクトプログラミングの
ための仕組み。
何らかの通信手段(TCPSocket や UNIXSocket など)を介して異なるプロセスやマシンの
間でオブジェクトにアクセスできる。

===[a:E] E

: EN...
...序関係を表す
演算子 <=> の俗称。

: 埋め込みドキュメント
: embedded document
ソースコード中の =begin 行から =end 行まで。コメントとみなされ実行されない。

その名の通り、この部分にコードのドキュメントを記述するこ...

ruby 1.9 feature (18.0)

ruby 1.9 feature ruby version 1.9.0 は開発版です。 以下にあげる機能は将来削除されたり互換性のない仕様変更がなされるかもしれません。 1.9.1 以降は安定版です。 バグ修正がメインになります。

...identity?

=== 2006-09-11

: Hash#identical
: Hash#identical?

=== 2006-08-31

: Array#shuffle
: Array#shuffle!

追加

=== 2006-07-26

: __send
: __send!

追加

: invoke_method
: invoke_functional_method

削除

=== 2006-07-21

: Module#attr

オプショナル引数の assignable が...
...= 2006-06-17

: BasicObject#invoke_method
: BasicObject#invoke_functional_method

追加
((<ruby-talk:197512>))

=== 2006-06-13

: IPsocket
: TCPsocket
: SOCKSsocket
: TCPserver
: UDPsocket
: UNIXsocket
: UNIXserver

削除

=== 2006-06-11

: __callee__ [new]
: __method__ [new]

((<URL:http:...
...0b*") # => ["foo", "bar"]
p Dir.glob("{f*,b*}") # => ["foo", "bar"]

=== 2005-09-05
: fcall [new]

追加

=== 2005-08-30
: Object#send, Object#__send__ [ruby][change]
レシーバを指定した呼び出しではprivateメソッドを呼び出せなくなりました。

=== 2005-06-09
:...