Class: OpenC3::UdpReadSocket

Inherits:
UdpReadWriteSocket show all
Defined in:
lib/openc3/io/udp_sockets.rb

Overview

Creates a UDPSocket and implements a non-blocking read.

Instance Method Summary collapse

Methods inherited from UdpReadWriteSocket

#method_missing, multicast?, #read, #write

Constructor Details

#initialize(recv_port = 0, multicast_address = nil, multicast_interface_address = nil, bind_address = "0.0.0.0") ⇒ UdpReadSocket

Returns a new instance of UdpReadSocket.

Parameters:

  • recv_port (Integer) (defaults to: 0)

    Port to receive data on

  • multicast_address (String) (defaults to: nil)

    Address to add multicast

  • multicast_interface_address (String) (defaults to: nil)

    Local incoming interface to receive multicast packets on

  • bind_address (String) (defaults to: "0.0.0.0")

    Local address to bind to (0.0.0.0 = All local addresses)



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/openc3/io/udp_sockets.rb', line 179

def initialize(
  recv_port = 0,
  multicast_address = nil,
  multicast_interface_address = nil,
  bind_address = "0.0.0.0"
)

  super(
    recv_port,
    bind_address,
    nil,
    multicast_address,
    multicast_interface_address,
    1,
    true,
    false)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OpenC3::UdpReadWriteSocket