Commit Graph

398 Commits

Author SHA1 Message Date
Tim
967cb09a6b Force timestampRequests for Chromeframe. 2013-08-27 15:33:29 +10:00
Nathan Rajlich
50684ff362 transports: fix WebSocket transport in the web browser
For realz this time...
2013-08-23 15:38:25 -07:00
Nathan Rajlich
af55d53b39 transports: fix WebSocket transport in the web browser 2013-08-23 14:43:00 -07:00
Nathan Rajlich
fe935edf97 socket: pass through the agent option to the Transport 2013-08-22 22:14:56 -07:00
Nathan Rajlich
43414294dd use updated component/global API 2013-08-22 21:46:49 -07:00
Nathan Rajlich
2c1870a77d transports: pass the options to the util.request() function
Probably not strictly necessary in this case...

In fact, I can't seem to find this `poller()` function being used anywhere
in the codebase in the first place! It only seems to be invoked in the tests...
2013-08-22 17:17:55 -07:00
Nathan Rajlich
3c1f28c6cc polling-xhr: pass the agent option to the XMLHttpRequest constructor 2013-08-22 17:16:25 -07:00
Nathan Rajlich
a9846e549f util: add jsdoc comment 2013-08-22 17:15:56 -07:00
Nathan Rajlich
a19e3ab1af util: make the request() helper accept an "options" object 2013-08-22 17:15:02 -07:00
Nathan Rajlich
62b647186d websockets: pass the agent option to the WebSocket constructor 2013-08-22 17:04:00 -07:00
Nathan Rajlich
018d7cb301 transport: set the agent field, defaults to false 2013-08-22 14:33:19 -07:00
Nathan Rajlich
164f71085c use "component/has-cors" 2013-08-22 14:16:26 -07:00
Nathan Rajlich
3f957b844c transport: fix whitespace 2013-08-22 13:38:21 -07:00
Nathan Rajlich
732180a082 util: use "component/global" 2013-08-22 13:37:54 -07:00
Nathan Rajlich
5ee23e8e41 use "component/global" 2013-08-22 12:01:28 -07:00
Nathan Rajlich
d0f7549d07 util: more bullet-proof global() function
Somebody could easily add a fake global `window` variable in node, and things
would have been thrown off before. With this logic, the *real* "global" is
always returned.
2013-08-22 11:24:08 -07:00
James Bowes
604e4ce0cb Don't lose packets writen during upgrade after a re-open
After a close, reset the prevBufferLen along with the buffers,
so a drain event after upgrade won't remove any packets that have been
queued up during upgrading.
2013-07-31 15:54:06 -03:00
Nathan Rajlich
9edbe83d6d socket: use a consistent "debug" name for socket.js 2013-07-25 16:16:45 -07:00
Naoyuki Kanezawa
d3d1375722 fix to check readyState 2013-06-22 13:24:29 +09:00
Guillermo Rauch
3536a45941 transports: improve polling orderly close (fixes #164) 2013-06-15 16:23:34 -07:00
Guillermo Rauch
76ae6d98e0 socket: ignore further transport communication upon onClose 2013-06-15 16:23:11 -07:00
Guillermo Rauch
51ac4b9879 socket: added missing socket#onerror support 2013-06-15 16:22:55 -07:00
Guillermo Rauch
d73668b8b1 socket: don't call socket#onclose if previous state was not open 2013-06-15 15:54:59 -07:00
Guillermo Rauch
96e8eb116d socket: code style 2013-06-15 15:54:51 -07:00
Guillermo Rauch
f9c42795ea transports: really fix iOS crash issue 2013-06-06 17:40:55 -07:00
Guillermo Rauch
97fb63be8e Merge pull request #150 from jphire/fix/104_improve_ping_api
Fix/104 improve ping api
2013-05-25 09:23:28 -07:00
Sweet Song
da88410d3d Does not emit close on incorrect socket connection 2013-05-10 16:16:31 -04:00
Gavin Uhma
35c49c72e7 use indexof component for ie8 and below 2013-05-09 17:58:59 -03:00
Róbert Oroszi
df01aeaef9 should handle xdomain, if we are in the browser 2013-04-05 15:28:03 +02:00
Róbert Oroszi
5f8d4f2f0b hostname should be tested against host, + port strict equality 2013-04-05 15:23:03 +02:00
Janne Laukkanen
2e54dda152 use ping() in setPing() 2013-04-04 13:15:07 +03:00
Janne Laukkanen
0e12bcaf9b improve ping api 2013-04-04 13:15:07 +03:00
3rd-Eden
3c6eb2a177 Don't check against the window to detect node.js, wrap code in a try catch statement
and have it degrade gracefully.

Fixes #147
2013-03-26 21:41:00 +01:00
Matthew Mueller
07777168fb I *think* this is a typo.
Right now, whenever I try upgrading to WS, I get:

    Uncaught TypeError: Object #<Transport> has no method 'setInterval'

Did a quick search for WS.prototype.setInterval and I don't see it anywhere. Removing `this` makes the upgrade work correctly.
2013-03-23 19:07:28 -07:00
albertyfwu
17d2dc275c only flush if writeBuffer is length 0
in onClose, cleanup writeBuffer, callbackBuffer
2013-03-19 12:11:55 -04:00
albertyfwu
a14a0bf676 added drain event 2013-03-18 13:24:14 -04:00
albertyfwu
4998d01503 fix flush and flushComplete events 2013-03-17 22:18:33 -04:00
albertyfwu
3a499d1bac added documentation for send and flush, flushComplete events 2013-03-17 21:03:27 -04:00
albertyfwu
0062f4ae03 added flush event to Socket.flush 2013-03-17 20:56:10 -04:00
albertyfwu
c12c1e29fa fixed drain bug splicing with upgrading 2013-03-17 11:50:39 -04:00
albertyfwu
25d092ca98 changes 2013-03-17 02:17:24 -04:00
albertyfwu
c650d9ad55 added in delayed flushing/callbacks 2013-03-17 02:07:20 -04:00
albertyfwu
b4c3eb8a23 empty callbackBuffer 2013-03-17 01:56:08 -04:00
albertyfwu
d081750310 changed int to var 2013-03-17 01:52:27 -04:00
albertyfwu
994b569e86 add support for callbacks with socket.send() 2013-03-17 01:52:26 -04:00
albertyfwu
fdb95d579c changes 2013-03-17 00:52:27 -04:00
albertyfwu
1f6ee883cf changes 2013-03-17 00:49:50 -04:00
albertyfwu
f3710ff859 fixed websocket flush/drain loop 2013-03-17 00:45:25 -04:00
albertyfwu
71ed033698 removed irrelevant code 2013-03-16 23:43:43 -04:00
albertyfwu
74094e179e wrapped drain call, changed back to encodePacket, moved intervalCleanup to WS, ... 2013-03-16 23:43:42 -04:00