Hi!<br><br>Insert a function clause to filter out these messages to the websocket_info/3 function. You are already including the process-id of the sending process in your broadcast/1 function, we can use that to filters out messages sent from self(). In practice, you _may_ want to use a logical id to perform this filtering rather than reusing the process-id of the connection that happened to be connected to a client at the time.<div>
<br></div><div>websocket_info({Pid, {_Module, ?BC}, _Msg}, Req, State) when Pid =:= self() -></div><div> {ok, Req, State, hibernate};</div><div><div>websocket_info({_Pid, {_Module, ?BC}, Msg}, Req, State) -></div>
<div> {reply, {text, <<Msg>>}, Req, State, hibernate}.</div></div><div><br>MVH Magnus</div><div><br><div class="gmail_quote">On Sat, Apr 7, 2012 at 4:13 PM, Barco You <span dir="ltr"><<a href="mailto:barcojie@gmail.com">barcojie@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Magnus,<br><br>Thank you very much!<br><br>Then, if broadcasting to all other clients except self, how to do it with gproc?<br>
<br>Regards,<br>Barco<div class="HOEnZb"><div class="h5"><br></div></div></blockquote></div></div>