class Argus::VideoStreamer
Attributes
host[R]
port[R]
tcp_socket[R]
Public Class Methods
new(opts={})
click to toggle source
# File lib/argus/video_streamer.rb 7 def initialize(opts={}) 8 @host = opts[:host] || '192.168.1.1' 9 @port = opts[:port] || 5555 10 @tcp_socket = opts[:socket] || TCPSocket.new(@host, @port) 11 end
Public Instance Methods
receive_data()
click to toggle source
# File lib/argus/video_streamer.rb 19 def receive_data 20 VideoData.new(tcp_socket) 21 end
start(udp_socket=nil)
click to toggle source
# File lib/argus/video_streamer.rb 13 def start(udp_socket=nil) 14 @udp_socket = udp_socket || UDPSocket.new 15 @udp_socket.send("\x01\x00\x00\x00", 0, host, port) 16 @udp_socket.close 17 end