るりまサーチ (Ruby 3.1)

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

別のキーワード

  1. rexml/document write
  2. _builtin write
  3. io write
  4. tuple write
  5. document write

ライブラリ

検索結果

UNIXServer#accept -> UnixSocket (43.0)

クライアントからの接続要求を accept(2)で待ち受け、接続した UNIXSocket のインスタンスを返します。

...からの接続要求を accept(2)で待ち受け、接続した
UNIXSocket のインスタンスを返します。

例:

require 'socket'

UNIXServer
.open("/tmp/s") {|serv|
c = UNIXSocket.open("/tmp/s")
s = serv.accept
s.write "from server"
c.write "from client"
p c.recv(20...