<?php
defined('BASEPATH') OR exit('No direct script access allowed');


class Welcome extends CI_Controller {

		function __construct() {
				parent::__construct();
				$cfgRabbitMq = $this->config->item('rabbitmq');
				$this->load->library('rabbitmq_client', $cfgRabbitMq);
		}

		public function index(){
				$this->load->view('welcome_message');
		}

		function getIpAddr(){
			$ip = $this->input->ip_address();
			echo 'Your IP Address is : '. $ip;
		}

		function testRabbitMq(){
				$this->rabbitmq_client->push('hello_queue', 'Hello World !');
				echo "hello world...";
		}

}
