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.
227 228 229 230 231 232 233 234 235 236 |
# File 'lib/openc3/interfaces/tcpip_server_interface.rb', line 227 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 |