Class: OpenC3::UdpWriteSocket

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

Overview

Creates a UDPSocket and implements a non-blocking write.

Instance Method Summary collapse

Methods inherited from UdpReadWriteSocket

#method_missing, multicast?, #read, #write

Constructor Details

#initialize(dest_address, dest_port, src_port = nil, multicast_interface_address = nil, ttl = 1, bind_address = "0.0.0.0") ⇒ UdpWriteSocket

Returns a new instance of UdpWriteSocket.

Parameters:

  • dest_address (String)

    Host to send data to

  • dest_port (Integer)

    Port to send data to

  • src_port (Integer[ Port to send data out from) (defaults to: nil)

    rc_port [Integer[ Port to send data out from

  • multicast_interface_address (String) (defaults to: nil)

    Local outgoing interface to send multicast packets from

  • ttl (Integer) (defaults to: 1)

    Time To Live for outgoing packets

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

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



152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/openc3/io/udp_sockets.rb', line 152

def initialize(
  dest_address,
  dest_port,
  src_port = nil,
  multicast_interface_address = nil,
  ttl = 1,
  bind_address = "0.0.0.0"
)

  super(
    src_port,
    bind_address,
    dest_port,
    dest_address,
    multicast_interface_address,
    ttl,
    false,
    true)
end

Dynamic Method Handling

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