Chmpx::getChmpxSlave
Retrieves a ChmpxSlave instance
Description
public function getChmpxSlave(bool $no_giveup_rejoin = false): ChmpxSlave|false {}
Retrieves a ChmpxSlave instance
Parameters
- no_giveup_rejoin
- Specifies true if reconnect automatically with a chmpx slave process
Return Values
A ChmpxSlave instance on success or false on failure.
Examples
php -r '$chmpx = new Chmpx(); $chmpx->createSlave("./tests/slave.yaml", true); var_dump($chmpx->getChmpxSlave());'
The above example will output:
object(ChmpxSlave)#2 (2) {
["chmpx_handle"]=>
resource(9) of type (chmpx_handle)
["msgid_handle"]=>
resource(8) of type (msgid_handle)
}
See Also
- Chmpx::construct - Creates a empty Chmpx instance
- Chmpx::destruct - Destroys a Chmpx instance
- Chmpx::createServer - Creates a ChmpxServer instance