Flowdock
method

recv_io

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: UNIXSocket
recv_io(p1 = v1, p2 = v2) public

UNIXServer.open(“/tmp/sock”) {|serv|

UNIXSocket.open("/tmp/sock") {|c|
  s = serv.accept

  c.send_io STDOUT
  stdout = s.recv_io

  p STDOUT.fileno #=> 1
  p stdout.fileno #=> 7

  stdout.puts "hello" # outputs "hello\n" to standard output.
}

}

Show source
Register or log in to add new notes.