Method: OpenC3::TcpipServerInterface#read
- Defined in:
- lib/openc3/interfaces/tcpip_server_interface.rb
#read ⇒ Packet
Returns Latest packet read from any of the connected clients. Note this method blocks until data is available.
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/openc3/interfaces/tcpip_server_interface.rb', line 216 def read raise "Interface not connected for read: #{@name}" unless connected? raise "Interface not readable: #{@name}" unless read_allowed? packet = @read_queue.pop return nil unless packet @read_count += 1 packet end |