In Files

  • socket/lib/socket.rb

Parent

Socket::UDPSource

UDP/IP address information used by Socket.udp_server_loop.

Attributes

local_address[R]
remote_address[R]

Public Class Methods

new(remote_address, local_address, &reply_proc) click to toggle source
 
               # File socket/lib/socket.rb, line 642
def initialize(remote_address, local_address, &reply_proc)
  @remote_address = remote_address
  @local_address = local_address
  @reply_proc = reply_proc
end
            

Public Instance Methods

inspect() click to toggle source
 
               # File socket/lib/socket.rb, line 649
def inspect
  "\#<#{self.class}: #{@remote_address.inspect_sockaddr} to #{@local_address.inspect_sockaddr}>"
end
            
reply(msg) click to toggle source
 
               # File socket/lib/socket.rb, line 653
def reply(msg)
  @reply_proc.call msg
end