Actions
Feature #936
closedIO.nread function
Status:
Closed
Assignee:
-
Target version:
-
Description
=begin
USAGE:
require 'socket'
s1 = UDPSocket.new
s1.bind("127.0.0.1", 0)
s2 = UDPSocket.new
s2.bind("127.0.0.1", 0)
s2.connect(*s1.addr.values_at(3,1))
s1.connect(*s2.addr.values_at(3,1))
s1.send "aasdfsadfwasdfasdaa", 0
IO.select([s2]) # emulate blocking recvfrom
# !!!!!!!!!!!!!!!!
p s2.recvfrom_nonblock(s2.nread) #=> ["aaa", ["AF_INET", 33302, "localhost.localdomain", "127.0.0.1"]]
# !!!!!!!!!!!!!!!!
=end
Files
Actions
Like0
Like0Like0