Added multichannels and a simple channel-based bus
This commit is contained in:
@ -40,13 +40,16 @@ class MultiStreamChannel implements ChannelInterface
|
||||
* {@inheritDoc}
|
||||
*
|
||||
* @param mixed $data
|
||||
* @return void
|
||||
* @return bool
|
||||
*/
|
||||
public function send($data)
|
||||
public function send($data):bool
|
||||
{
|
||||
foreach ($this->clients as $client) {
|
||||
$client->send($data);
|
||||
foreach ($this->clients as $i=>$client) {
|
||||
if (false === $client->send($data)) {
|
||||
unset($this->clients[$i]);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user