Commit Graph

365 Commits

Author SHA1 Message Date
Guillermo Rauch
95e787dcc5 Removed all transport-specific methods from Memory store
Added publish/subscribe placeholders that basically do nothing.
2011-06-27 15:40:32 -03:00
Guillermo Rauch
5342dd6d76 Refactored Socket
- initialize options in constructor
  - inherit from EventEmitter always
  - added generic Socket#client
2011-06-27 15:37:30 -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
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
c210241379 Refactored handshake 2011-06-27 15:27:58 -03:00
Guillermo Rauch
8594d684ef Fixed style 2011-06-27 15:27:44 -03:00
Guillermo Rauch
970621d5ee Refactored client request handling:
- removed the concept of async handshake, since we now keep track of open/closed
   clients and handshakes across all nodes (replication)
 - when a client closes temporarily, before the disconnection is triggered and before
   the transport is reopened in any node, we buffer messages in all nodes. We therefore
   remove the need for a complex message queue with a memory tradeoff (buffer redundancy).
2011-06-27 15:21:50 -03:00
Guillermo Rauch
c9d9c2e8b3 Added initStore and subscription handlers. 2011-06-27 15:21:01 -03:00
Guillermo Rauch
8f44f026ee Removed usage of Store#disconnect, replaced with a simple subscription. 2011-06-27 15:20:35 -03:00
Guillermo Rauch
c369073a72 Moved id generation method into the manager. 2011-06-27 15:18:37 -03:00
Guillermo Rauch
b700f0546d Added call to initStore to initialize subscriptions. 2011-06-27 15:16:54 -03:00
Guillermo Rauch
0701408061 Added redis client dependency.
Removed >= from policy.
2011-06-27 15:14:53 -03:00
Guillermo Rauch
bafb347e4a Changed console.error to console.log. 2011-06-22 23:56:14 -03:00
Guillermo Rauch
802da70bf7 Fixed; bind both servers at the same time do that the test never times out. 2011-06-22 22:18:51 -03:00
Guillermo Rauch
f2711daa37 Merge pull request #282 from 3rd-Eden/master
304
2011-06-22 15:49:56 -07:00
Arnout Kazemier
7200dfed84 Output the correct name 2011-06-23 00:48:06 +02:00
Arnout Kazemier
b348f4de99 Style 2011-06-23 00:23:18 +02:00
Arnout Kazemier
6452602603 Merge branch 'master' of https://github.com/LearnBoost/Socket.IO-node 2011-06-23 00:20:55 +02:00
Arnout Kazemier
6f93bb2ec7 Added 304 support 2011-06-23 00:20:28 +02:00
Guillermo Rauch
ffd3e8bc96 Removed Transport#name for abstract interface. 2011-06-22 18:40:26 -03:00
Guillermo Rauch
bdea4b11a7 Merge pull request #281 from 3rd-Eden/master
Lazy load http / https modules & fix for crash in memory store
2011-06-22 13:49:54 -07:00
Arnout Kazemier
041b5655f9 Delete they client instead of setting it to null. And make sure the client exists
before we do .disconnect
2011-06-22 22:43:39 +02:00
Arnout Kazemier
080676bf6e Lazy require http and https module only when needed 2011-06-22 21:40:02 +02:00
Guillermo Rauch
2e7076abcc Merge pull request #273 from 3rd-Eden/master
merge fail
2011-06-22 01:27:43 -07:00
Arnout Kazemier
b87e51bae3 Refixed merge fail 2011-06-22 10:26:39 +02:00
Guillermo Rauch
cc5bc44ef0 Merge pull request #265 from 3rd-Eden/master
Better naming in the logging
2011-06-22 01:25:30 -07:00
Arnout Kazemier
4672ab65d7 Merge branch 'master' of https://github.com/LearnBoost/Socket.IO-node
Conflicts:
	lib/transports/http-polling.js
2011-06-22 10:24:35 +02:00
Guillermo Rauch
331e6e85b9 Release 0.7.2 0.7.2 2011-06-22 04:15:01 -03:00
Guillermo Rauch
f2df40aa02 Bumped client version.
Bumped version
2011-06-22 04:12:26 -03:00
Guillermo Rauch
36ecd49ad2 Updated tests. 2011-06-22 04:09:19 -03:00
Guillermo Rauch
aef5027640 Make sure to write a packet (of type noop) when closing a poll. This solves a problem
with cross-domain requests being flagged as aborted and reconnection being triggered.
2011-06-22 04:08:28 -03:00
Guillermo Rauch
4933cf1a9e Added noop message type. 2011-06-22 04:08:11 -03:00
Arnout Kazemier
28b396c3fc Merge branch 'master' of https://github.com/LearnBoost/Socket.IO-node 2011-06-22 08:58:33 +02:00
Guillermo Rauch
c425724bd2 Release 0.7.1 0.7.1 2011-06-21 21:05:11 -03:00
Guillermo Rauch
0b9bc61ff1 Added CORS test to xhr-polling suite. 2011-06-21 21:02:22 -03:00
Guillermo Rauch
3bab44506b Added header override support in test client. 2011-06-21 21:02:11 -03:00
Guillermo Rauch
aeac79faa9 Fixed; restored headers in POST responses. 2011-06-21 20:34:20 -03:00
Guillermo Rauch
903f7ec9ff Fixed cross-domain POST XHR requests for Firefox. 2011-06-21 20:17:24 -03:00
Arnout Kazemier
808e794ec5 Merge branch 'master' of github.com:3rd-Eden/Socket.IO-node 2011-06-21 21:35:42 +02:00
Arnout Kazemier
cb7aa0a79c Merge branch 'master' of https://github.com/LearnBoost/Socket.IO-node 2011-06-21 21:35:26 +02:00