Could someone in the know care to explain the difference between
socket.send and socket.emit, and when it's appropriate to use them?
--
Linus G Thiel
Hansson & Larsson
http://hanssonlarsson.se/
+46 709 89 03 85
Sorry I think I was confused. socket.send is for regular messages
right, and emit is if you want to send a particular kind of event?
Hi,
Sorry I think I was confused. socket.send is for regular messages
right, and emit is if you want to send a particular kind of event?
On Mon, Jul 18, 2011 at 12:28, Linus G Thiel <li...@hanssonlarsson.se> wrote:
> Hi,
>
> Could someone in the know care to explain the difference between
> socket.send and socket.emit, and when it's appropriate to use them?
>
> --
> Linus G Thiel
> Hansson & Larsson
> http://hanssonlarsson.se/
> +46 709 89 03 85
>
--
Linus G Thiel
Hansson & Larsson
http://hanssonlarsson.se/
+46 709 89 03 85
Could you please shed some light on how namespaces work on the client side?
Do I have to do
var foo = io.connect("http://localhost/foo"),
bar = io.connect("http://localhost/bar");
Or can I utilize the same kind of api as on the server, so
var socket = io.connect();
socket.of("/foo").json.emit("qux", {foo: 1});
?
Hi,I'm trying to send messages from client to server, but socket.send and socket.emit not send messages on the server console.anyone can help me?thanks