CodeIgniter library realtime communication by using Websocket technology and Ratchet (Socketo.me & codeigniter-websocket)
- PHP 5.6+
- CodeIgniter Framework (3.1.* recommanded)
- Composer
- PHP sockets extension enabled
Clone The Repository
git clone https://github.com/takielias/codeigniter-websocket-example.git
Run the following command in the folder of your project :
composer install
Open you'r command prompt then type the command bellow in you'r project folder :
php index.php welcome index
Open two pages of your project on following url with different IDs :
http://localhost/codeigniter-websocket-example/index.php/user/index/1
http://localhost/codeigniter-websocket-example/index.php/user/index/2
❗ In my example, recipient_id is defined by user_id, as you can see, it's the auth callback who defines recipient ids.
If you have something like that, everything is ok for you:
Be free to open an issue or send pull request