Class: Async::IO::UDPSocket

Inherits:
IPSocket show all
Defined in:
lib/async/io/udp_socket.rb

Overview

Asynchronous UDP socket wrapper.

Constant Summary

Constants inherited from Generic

Generic::WRAPPERS

Instance Method Summary collapse

Methods inherited from Generic

#read, wrap, wrap_blocking_method, wraps, #write

Instance Method Details

#recvfromObject

This function is so fucked. Why does ‘UDPSocket#recvfrom` return the remote address as an array, but `Socket#recfrom` return it as an `Addrinfo`? You should prefer `recvmsg`. Invokes `recvfrom_nonblock` on the underlying io. If the operation would block, the current task is paused until the operation can succeed, at which point it’s resumed and the operation is completed.



33
# File 'lib/async/io/udp_socket.rb', line 33

wrap_blocking_method :recvfrom, :recvfrom_nonblock