Closed delaneyj closed 10 years ago
It is already in the code!
factory Socket(String url, {bool usePolling: false, int heartbeat: 2000}) { print("choose a socket implementation!"); if (usePolling || !WebSocket.supported) { return new PollingSocket(url, heartbeat); } else { return new WebSocketWrapper(url); } }
See Websocket.supported for this! So I check already the usage for that, you can only set this too by the optional parameter!
Please reopen it when the fallback is not working in a browser. Or give me a pull request with a fix in it ;-)
Ah, I was picking up the "Choose a socket implementation" which should probably be "Choosing an socket implementation: X found" or something.
If the browser doesn't support WebSocket then use long polling as a last resort and setup automatically.