Commit Graph

57 Commits

Author SHA1 Message Date
Guillermo Rauch
381bc4260a socket: forgot this js oddity that you can access objects with strings or numbers 2012-12-18 17:20:20 -03:00
Guillermo Rauch
8a5cb03fcb socket: fix Socket#ack 2012-12-18 17:20:01 -03:00
Guillermo Rauch
22c91d8e49 socket: allow for falsy packet.id 2012-12-18 17:19:36 -03:00
Guillermo Rauch
bd37a9a34b socket: protect against __proto__ deletion 2012-12-18 17:00:44 -03:00
Guillermo Rauch
a0020bcb2c socket: fix event packet 2012-12-18 15:22:16 -03:00
Guillermo Rauch
56ed3fbe75 socket: fixed packet handling 2012-12-18 15:15:12 -03:00
Guillermo Rauch
56221bc093 socket: attempt to send disconnect packets prior to closing the transport
this will prevent reconnection from triggering
2012-12-18 14:57:37 -03:00
Guillermo Rauch
5da04cd1a9 socket: fixed EventEmitter inheritance 2012-12-18 14:57:23 -03:00
Guillermo Rauch
342845d5c2 socket: added missing acks initialization 2012-12-18 14:56:58 -03:00
Guillermo Rauch
12d1dca7ca socket: added more blacklisted events 2012-12-18 14:56:24 -03:00
Guillermo Rauch
a8ea0f4fb0 socket: added Emitter mixin 2012-12-17 14:36:24 -03:00
Guillermo Rauch
b6a4899689 initial 1.0 commit 2012-12-13 12:14:54 -03:00
Daniel Baulig
00694a8a98 Fix issue #795 2012-03-19 22:03:31 +01:00
Guillermo Rauch
11f1a7c491 Merge pull request #347 from 3rd-Eden/socket.transport
Expose socket.transport
2011-10-07 10:07:05 -07:00
Guillermo Rauch
e3fb39da3d Corrected comment; (fixes #433) 2011-09-03 14:33:00 -07:00
Guillermo Rauch
69941e602b Fixed emission of error event resulting in an uncaught exception if unhandled (fixes #476). 2011-09-03 10:48:31 -07:00
Arnout Kazemier
a631f86b3b Merged with upstream master 2011-07-31 10:22:54 +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
0a2d0b9d0b Fixed disconnect logic 2011-07-12 03:41:15 -03:00
Guillermo Rauch
4495f5987a Simplified remote events handling in Socket. 2011-07-11 23:51:42 -03:00
Arnout Kazemier
9cfdb8ed97 Expose socket.transport 2011-07-06 00:10:25 +02:00
Arnout Kazemier
d39d1401c4 Fixed broken test suite 2011-07-05 00:59:31 +02:00
Guillermo Rauch
494b2d4487 Added Socket#has
Added `Socket#del`
2011-06-29 11:35:13 -03:00
Guillermo Rauch
ba3b854190 Changed; make sure to cache a reference to the client object so that it can be
referenced after its destroying and before the data expires.
2011-06-29 11:33:54 -03:00
Guillermo Rauch
2a1b2bd37e Added Socket#handshake data getter. 2011-06-28 07:37:15 -03:00
Guillermo Rauch
195e227393 Refactored Socket#disconnect to intelligently decide whether the disconnection has
to be forced or just destroy the storage, so that a re-opening of the transport is
not possible.
2011-06-27 15:36:20 -03:00
Guillermo Rauch
c28a85e520 Refacotred Socket#set and Socket#get 2011-06-27 15:36:08 -03:00
Guillermo Rauch
bf8b1e6879 Added Socket#dispatch, in charge of intelligently determining whether the packet
has to be relied to other nodes to handle, handle it internally, or discarding it
if it's volatile from the local buffer provided the transport is not open.
2011-06-27 15:35:09 -03:00
Guillermo Rauch
240cf3fde6 Leverage Socket#dispatch to dispatch a message. 2011-06-27 15:34:46 -03:00
Guillermo Rauch
d40cde8503 Refactored Socket#leave 2011-06-27 15:34:31 -03:00
Guillermo Rauch
db9d81971d Refactored Socket#join 2011-06-27 15:34:20 -03:00
Guillermo Rauch
54d2c0111d Changed; Socket#store now returns the client store. 2011-06-27 15:32:44 -03:00
Guillermo Rauch
cfd5315b1e Removed disconnect subscription per-socket (added unnecessary overhead with multiple
namespaces).
2011-06-27 15:32:19 -03:00
Guillermo Rauch
e77a363c3c Changed; .send ACK always automatic. 2011-06-12 08:37:40 -03:00
Guillermo Rauch
2066aef41a Changed; minor thingies. 2011-06-11 18:22:29 -03:00
Guillermo Rauch
e472483bb1 Make sure to retain packet.endpoint for socket messsages. 2011-05-25 01:26:46 -07:00
Guillermo Rauch
5f1d5e30dc Reverted back to the room flag for Socket. This way we can call SocketNamespace#in
when we relay a packet to the namespace, instead of overriding the endpoint acting
directly on SocketNamespace#flag. In addition, the room is only useful for broadcasting,
and it has no effect on the client, so `endpoint` should remain untouched.
2011-05-25 00:49:43 -07:00
Guillermo Rauch
3ba715eb49 Added support for the Socket#broadcast getter in Socket#packet
Added Socket#setFlags for consistency with SocketNamespace.
2011-05-25 00:22:41 -07:00
Guillermo Rauch
aac298d212 Fixed Socket#to and Socket#join. Make sure that the name of the room preserves the
namespace as prefix, unless the namespace is ''. This prevents collisions between
rooms of the '' endpoint with other arbitrary endpoints.
2011-05-24 23:46:59 -07:00
Guillermo Rauch
5dc8ddcda8 Added missing socket id to Store#join call. 2011-05-24 23:34:28 -07:00
Guillermo Rauch
aa4ffff9f9 Fixed broken reference to SocketNamespace object in Socket#join. 2011-05-24 23:33:24 -07:00
Guillermo Rauch
7c6da424c0 Added new broadcast flag to Socket.
Added `Socket#to` for targeting rooms when broadcasting.
2011-05-24 23:25:48 -07:00
Guillermo Rauch
a08b791cb8 Fixed Socket#emit with function as last argument (event packet with ACK) 2011-05-24 22:31:29 -07:00
Guillermo Rauch
bfabd6eadf Renamed Socket#packets ACK packets count to ackPackets for clarity. 2011-05-24 21:16:45 -07:00
Guillermo Rauch
79f6e5c538 Make sure that Socket#packet encodes the message prior to publication. 2011-05-24 21:01:05 -07:00
Guillermo Rauch
aa3b99a630 Added Socket#$emit as the original EventEmitter emit 2011-05-24 18:51:40 -07:00
Guillermo Rauch
a2c30a1416 Fixed event emission from Socket (the name key was missing) 2011-05-22 20:17:20 -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
Guillermo Rauch
d35998a633 Added reason support to disconnect callbacks. 2011-05-17 16:07:54 -07:00