るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. webrick/https client_cert
  2. imap client_thread
  3. imap client_thread=
  4. openssl client_ca
  5. sslcontext client_ca

ライブラリ

クラス

検索結果

UNIXServer#accept -> UnixSocket (54409.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) #=> "from server"
p s.recv(20) #=> "from clie...