Guillermo Rauch
44a79f9cee
server: make Server#adapter work after construction
2014-03-07 18:33:36 -03:00
Kevin Roark
c2bf0ea700
Added binary support to broadcasting of events
...
lib/namespace.js previously was not considering whether an event had
binary data and was giving all events parser.EVENT type -- now it uses
the has-binary-data module to set the event type appropriately.
Then, after this fix there was a problem with lib/adapter.js -- because
socket.io-parser modifies the packet object in its encoding, the sockets
after the 1st in a broadcast were not getting the correct data. To fix
this, the data is encoded once in adapter, and then the encoded data
is passed to each of the sockets.
lib/socket.js and lib/client.js were updated to allow for the above. The
.packet method of each now takes an optional second "preEncoded" parameter
-- if this is true, then client skips the encoding and just writes the
packet argument directly to engine.
test/socket.io.js was updated to add two new tests that test
multi-messaging of events with binary data.
2014-03-02 22:15:16 -05:00
Guillermo Rauch
da844159d9
namespace: jshint friendly usage of reserved keyword for backwards-compatibility
2013-12-24 20:10:16 -03:00
Guillermo Rauch
c545e3b963
lib: fix style
2013-12-24 19:56:01 -03:00
Guillermo Rauch
5f843feb90
namespace: make sure not to fire connection if underlying client closed after next is called from a middleware
2012-12-24 19:50:25 -03:00
Guillermo Rauch
dd0fd539e6
namespace: fix emit
2012-12-23 23:19:05 -03:00
Guillermo Rauch
5d4f90de47
namespace: make in able to track multiple rooms
2012-12-23 23:18:48 -03:00
Guillermo Rauch
59c8c34ceb
namespace: fix flags
2012-12-23 23:18:38 -03:00
Guillermo Rauch
bcfec6df76
namespace: added connected hash
2012-12-23 23:18:26 -03:00
Guillermo Rauch
dbba592dfa
namespace: implement own flags
2012-12-23 23:18:14 -03:00
Guillermo Rauch
97b63b0860
namespace: blacklist newListener event
2012-12-18 14:56:44 -03:00
Guillermo Rauch
3a259d420c
namespace: improve middleware logic
2012-12-18 14:55:58 -03:00
Guillermo Rauch
c67d2d5494
namespace: instrument add
2012-12-17 08:29:43 -03:00
Guillermo Rauch
70ce641d85
namespace: fix run call
2012-12-16 23:50:46 -03:00
Guillermo Rauch
b6a4899689
initial 1.0 commit
2012-12-13 12:14:54 -03:00
einaros
63043b3d5d
fixes leak #608
2011-10-31 22:47:25 +01:00
Guillermo Rauch
0224e4ac5f
Merge pull request #569 from 3rd-Eden/blacklist
...
Blacklist events
2011-10-11 08:13:55 -07:00
Arnout Kazemier
ecd20b0e1f
Added support for blacklisting events that are emitted from the client side.
...
Currently it's possible for a client do .emit('disconnect') and this will trigger
the disconnect event on the server.. Which can lead to major issues.
We should black list that by default. You can override or add more events by adding
them to the `blacklist` setting
2011-10-11 10:40:22 +02:00
Arnout Kazemier
b8f6dc7810
Inital stab at blacklisting client side events
2011-10-11 09:53:26 +02:00
Arnout Kazemier
b3740e9ab6
fixes #538
2011-10-10 21:52:16 +02:00
Guillermo Rauch
7ac9c2e888
Fixed style
2011-09-03 10:48:23 -07:00
Guillermo Rauch
984639ba67
Merge pull request #381 from 3rd-Eden/alias
...
Added alias for to to in and in to to
2011-07-30 20:27:30 -07:00
Arnout Kazemier
a821cce390
Fix for #407
2011-07-22 22:52:20 +02:00
Arnout Kazemier
53f0f4d66d
Added alias for to to in and in to to
2011-07-14 21:31:55 +02:00
Guillermo Rauch
8798cfbced
Merge pull request #340 from 3rd-Eden/291
...
It was emitting uknown room, so the messages where never send
2011-07-12 00:55:49 -07:00
Guillermo Rauch
d3eac92eaa
Leveraged $emit instead of emit internally.
2011-07-12 04:28:55 -03:00
Arnout Kazemier
d39d1401c4
Fixed broken test suite
2011-07-05 00:59:31 +02:00
Arnout Kazemier
a70347b15f
Fixed #285
2011-07-05 00:37:19 +02:00
Arnout Kazemier
1a2c8aa31f
It was emitting uknown room, so the messages where never send fixes #291
2011-07-05 00:17:02 +02:00
Vladimir Dronnikov
44919189ec
normalize SocketNamespace local eventing
2011-06-30 03:12:55 -07:00
Arnout Kazemier
06e29fef67
Use packet.reason or default to 'packet'
2011-06-29 21:58:13 +02:00
Arnout Kazemier
16518c0715
Added a small indicator + test suite so you can see how a user is disconnected
2011-06-29 21:45:14 +02:00
Arnout Kazemier
299e097fa7
Added storage for socket.handshake & updated test suite to check for it
2011-06-28 23:50:33 +02:00
Arnout Kazemier
8abe712294
Passes test suite
2011-06-28 21:41:46 +02:00
Guillermo Rauch
fb79657476
Added SocketNamespace#clients
2011-06-28 13:33:01 -03:00
Guillermo Rauch
cbc12ecdcf
Make sure to leave rooms upon disconnection of a namespace (fixes some bug).
2011-06-27 15:31:44 -03:00
Guillermo Rauch
9aa650e430
Removed the join callback, since it's not necessary (TCP based pub/sub guarantees
...
proper total ordering).
2011-06-27 15:30:47 -03:00
Guillermo Rauch
f06fefab14
Added handleDisconnect method to emit the disconnect event when the socket is
...
disconnected due to network reasons, making sure we don't emit it on non-connected
namespaces.
2011-06-27 15:30:02 -03:00
Guillermo Rauch
5b6efb784f
Simplified global message dispatching by leveraging subscriptions.
2011-06-27 15:28:24 -03:00
Guillermo Rauch
bd2ce6ecf3
Fixed propagation of packets through SocketNamespace.
2011-06-13 12:10:23 -03:00
Guillermo Rauch
e574ba4a5c
Fixed; added echo connect packet for all namespaces connections.
2011-06-12 07:53:46 -03:00
Guillermo Rauch
50a8d2d50a
Revert.
2011-06-11 22:56:55 -03:00
Guillermo Rauch
2066aef41a
Changed; minor thingies.
2011-06-11 18:22:29 -03:00
Guillermo Rauch
13e9727e5c
Remove connection event upon socket initialization, this is now handled by the Manager.
2011-06-10 12:06:55 -03:00
Guillermo Rauch
4427b3e64b
Added SocketNamespace#except flag setter.
...
Added; keep track of exceptions (list of session ids) as part of flags, that then
get reset.
Fixed JSON double encoding.
2011-05-25 00:21:51 -07:00
Guillermo Rauch
3f030bd3fb
Fixed SocketNamespace#in, editing the endpoint flag directly instead of creating
...
`room`.
2011-05-24 23:46:31 -07:00
Guillermo Rauch
6e76229eb9
Make sure to encode packets in SocketNamespace#packet.
2011-05-24 23:25:30 -07:00
Guillermo Rauch
61eb0a2fd4
Added manual ack data callback handling.
2011-05-24 21:00:48 -07:00
Guillermo Rauch
aa3b99a630
Added Socket#$emit as the original EventEmitter emit
2011-05-24 18:51:40 -07:00
Guillermo Rauch
8416e76114
Added SocketNamespace#store shortcut.
...
Added SocketNamespace#in
Added SocketNamespace#for
Implemented SocketNamespace#packet
Fixed SocketNamespace#emit
Fixed SocketNamespace#send
2011-05-21 20:56:31 -07:00