Php 向发件人以外的所有用户发布邮件

Php 向发件人以外的所有用户发布邮件,php,websocket,broadcast,symfony-3.4,phpwebsocket,Php,Websocket,Broadcast,Symfony 3.4,Phpwebsocket,我正在使用GosWebSocketBundle()发送通知/消息。我已经参考了文档,并向公共频道的所有订户发送了广播消息。但我不希望发件人收到自己的邮件。请帮帮我 public function onSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request) { //this will broadcast the message to ALL subscribers of this topic. $

我正在使用GosWebSocketBundle()发送通知/消息。我已经参考了文档,并向公共频道的所有订户发送了广播消息。但我不希望发件人收到自己的邮件。请帮帮我

public function onSubscribe(ConnectionInterface $connection, Topic $topic, WampRequest $request)
{
//this will broadcast the message to ALL subscribers of this topic.
$topic->broadcast(['msg' => $connection->resourceId . " has joined " . $topic->getId()]);
}

public function onPublish(ConnectionInterface $connection, Topic $topic, WampRequest $request, $event, array $exclude, array $eligible)
{
$topic->broadcast(['msg' => $event]);
}

我认为最简单的方法是向所有人广播,让客户忽略自己的内容messages@Psi请给我解释一些伪代码我想你自己能弄明白。其思想是随消息一起发送客户端标识符。当客户机收到消息时,他会意识到消息是由他发送的,并忽略它。这样,您就不需要在服务器端进行拆分。我认为最简单的方法是向所有人广播,让客户机忽略自己messages@Psi请给我解释一些伪代码我想你自己能弄明白。其思想是随消息一起发送客户端标识符。当客户机收到消息时,他会意识到消息是由他发送的,并忽略它。这样,您就不需要在服务器端进行拆分