lib/async/udp_socket.rb in async-0.12.0 vs lib/async/udp_socket.rb in async-0.13.0
- old
+ new
@@ -19,12 +19,16 @@
# THE SOFTWARE.
require_relative 'socket'
module Async
- # Asynchronous UDP socket.
+ # Asynchronous UDP socket wrapper.
class UDPSocket < IPSocket
+ wraps ::UDPSocket
+
# We pass `send` through directly, but in theory it might block. Internally, it uses sendto.
- wraps ::UDPSocket, :send
+ def_delegators :@io, :send
+
+ wrap_blocking_method :recvfrom, :recvfrom_nonblock
end
end