method
accept
v1_9_3_392 -
Show latest stable
- Class:
UNIXServer
accept()public
Accepts a new connection. It returns new UNIXSocket object.
UNIXServer.open("/tmp/sock") {|serv| UNIXSocket.open("/tmp/sock") {|c| s = serv.accept s.puts "hi" s.close p c.read #=> "hi\n" } }