lib/dvbstreamer/client.rb
## Send a commend to the server
Send a commend to the server
Send a commend to the server
def command(cmd,*args)
			args.unshift(cmd)
			$stderr.puts "Sending: "+args.join(' ')
			@socket.puts(args.join(' '))
			response = Response.new
			while (line = @socket.readline)
				response.parse_line( line )
				return response unless response.code.nil?
			end
			return nil
		end
def command ( cmd , * args ) args . unshift ( cmd ) $stderr . puts "Sending: " + args . join ( ' ' ) @socket . puts ( args . join ( ' ' ) ) response = Response . new while ( line = @socket . readline ) response . parse_line ( line ) return response unless response . code . nil? end return nil end
Send a commend to the server
Send a commend to the server
# Add the commend to the start of the arguments # Send the command it its arguments to the server # FIXME: insert timeout code here # FIXME: add re-connect code # Read in the response line by line # Parse the line into the response object # Stop when we have a response code
cmd
<not_specific>
args
<not_specific>