method

recv_io

v2_1_10 - Show latest stable - 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.
}

}