Commit Graph

409 Commits

Author SHA1 Message Date
Roman Shtylman
a969aa761a add browserify support
fixes #200
2013-11-01 21:24:46 -04:00
Guillermo Rauch
b917a50f81 Merge pull request #178 from goinstant/stash/catch-xhr-send
Emit errors thrown by xhr.send()
2013-10-17 07:48:40 -07:00
Jonathan Gros-Dubois
55b6302e8a Fixed issue which prevented IE9 and under to pass Cookies to server during handshake 2013-10-17 22:59:04 +11:00
Dainis Tillers
305d703650 Fixed - there is no host property only hostname 2013-09-19 15:15:25 +03:00
Dainis Tillers
f8b68c969e Fixed - flash socket creation should not call websocket doOpen as that will create a websocket and not a flashsocket connection because of changed scope(in websocket transport WebSocket is pointing to value returned by ws library, which in case of IE6,7,8 will be null and in result of that will fail with an error) 2013-09-19 15:15:18 +03:00
Nathan Rajlich
22a4a4b097 websocket: pass undefined as the WebSocket "protocols"
Fixes: https://cloudup.com/cfn0Edwkpya
2013-08-30 20:21:43 -07:00
Guillermo Rauch
c7dc4bd0ce Merge pull request #193 from LearnBoost/add/component/ws
Add and use `component/ws`
2013-08-30 15:58:04 -07:00
Nathan Rajlich
af026a20b2 websocket: remove the "bufferedAmount" checking logic
This code was buggy to begin with, and actually the underlying
technique being used was non-deterministic and wouldn't work in practice
anyways.

The WebSocket client API kinda sucks in this regard, since it's virtually
impossible to implement proper ACKs using the WebSocket API by itself.
2013-08-30 15:46:27 -07:00
Nathan Rajlich
22ffc825cb websocket: no more env sniffing, just require ws
This should make @shtylman very happy...
2013-08-29 09:34:46 -07:00
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
Stash
0c70eabaf0 By util.defer(fn) I really mean setTimeout(fn,0) 2013-07-29 12:55:56 -07:00
Stash
cedca5699f Emit errors thrown by xhr.send() 2013-07-29 12:31:34 -07: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