hoaproject / Websocket

The Hoa\Websocket library.
https://hoa-project.net/
422 stars 75 forks source link

Explain how to send a message to a specific node in the documentation #38

Open Hywan opened 9 years ago

Hywan commented 9 years ago

Hello :-),

This is the second or third time someone asks “How to send a message to a specific node”, on the support ML, IRC or even comments. I think we should update the documentation ;-).

thehawk970 commented 9 years ago

Like here #53

Hywan commented 9 years ago

@camael24 :+1:

mspmakk commented 9 years ago

Hello Hywan,

As u say send a message to a specific node use " broadcastIf " method.

but my question is what should i have to pass in to the first argument in that method. broadcastIf ( \Closure $predicate, $message ){...} I didn't get any idea about it. sorry i'm new to this library.

thanks,

Hywan commented 9 years ago

@mspmakk Hi! What do you want to do exactly?

mspmakk commented 9 years ago

I am working on some notification updates module. When I post some thing then other related user (friends) should get notified.

In short send some data to particular user. so i though that it should be possible through " broadcastIf " method.

Pierozi commented 8 years ago

@mspmakk I think your issues is this one, and i never solved the PR past 2 years ago :disappointed: https://github.com/Pierozi/Socket/commit/60bd4b4ce37c587442efd44885e1ab63314e2870