Flowdock
method

accept

Importance_1
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"
  }
}
Show source
Register or log in to add new notes.