gimite / web-socket-js

HTML5 Web Socket implementation powered by Flash
BSD 3-Clause "New" or "Revised" License
2.73k stars 489 forks source link

latest draft #95

Closed dvv closed 12 years ago

dvv commented 12 years ago

Hi!

Since master now supports the latest draft, is there something that could be borrowed from https://github.com/Worlize/AS3WebSocket ?

TIA, --Vladimir

gimite commented 12 years ago

Oh I didn't know about this library. But I don't think of anything we can borrow for now.

dvv commented 12 years ago

i saw this polyfill won't allow wss:// to work via proxy. the mentioned lib uses different socket provider and claims to do work. i'm not fluent in actionscript, just wanted you be aware.

gimite commented 12 years ago

I guess it only works on Adobe Air. I believe such connection doesn't work on Flash Player due to requirement of Flash socket policy file.

dvv commented 12 years ago

I see. Couldn't you provide me with a link, or explain why wss:// via proxy doesn't work? I'm planning to use namely this thing -- a secure connection from behind a corporate firewall. TIA

gimite commented 12 years ago

Actually I believe connection via proxy doesn't work in general, though there's code which try to do so in web-socket-js. Flash socket requires socket policy file on the server it connects to. When it connects via proxy, it means that the proxy server needs to return socket policy file, which is not likely. The contributor who added the proxy support said that it does work, and I don't have environment to check it, so I pulled the change as is. But I don't know whether it actually works. There might be some special handling with proxies in Flash socket, though.

See here for details about Flash socket policy file: http://www.lightsphere.com/dev/articles/flash_socket_policy.html