Last active
August 29, 2015 14:08
-
-
Save quest/2f85c56022491c8aaefc to your computer and use it in GitHub Desktop.
ElephantIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public $components = array( | |
'ElephantIO.ElephantIO' => array( | |
'url' => 'http://127.0.0.1:3000', //IP:PORT to SocketIO | |
'version' => '1X', //1X or 0X | |
'options' => array() // only for 1x, see more: https://github.com/Wisembly/elephant.io/blob/master/src/Engine/AbstractSocketIO.php#L199 | |
) | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function index() { | |
$this->ElephantIO->init(); // connect to socket.io | |
$this->ElephantIO->emit('set nick', array('nickname' => 'Victor')); // emit 'set nick' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment