UDP/IP address information used by Socket.udp_server_loop.
Attributes
Read
Local address
Read
Address of the source
Class Methods
3.4
View on GitHub
# File tmp/rubies/ruby-3.4.1/ext/socket/lib/socket.rb, line 1455
def initialize(remote_address, local_address, &reply_proc)
@remote_address = remote_address
@local_address = local_address
@reply_proc = reply_proc
end
remote_address is an Addrinfo object.
local_address is an Addrinfo object.
reply_proc is a Proc used to send reply back to the source.
Instance Methods
3.4
View on GitHub
# File tmp/rubies/ruby-3.4.1/ext/socket/lib/socket.rb, line 1472
def reply(msg)
@reply_proc.call msg
end
Sends the String msg to the source