CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Sat, 09 Aug 2025 09:57:33 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100718025942
location: https://web.archive.org/web/20100718025942/https://github.com/gimite/web-socket-js/
server-timing: captures_list;dur=0.838382, exclusion.robots;dur=0.035728, exclusion.robots.policy;dur=0.021337, esindex;dur=0.014672, cdx.remote;dur=14.361802, LoadShardBlock;dur=306.930485, PetaboxLoader3.datanode;dur=78.076120, PetaboxLoader3.resolve;dur=56.314492
x-app-server: wwwb-app201
x-ts: 302
x-tr: 372
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app201; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Sat, 09 Aug 2025 09:57:34 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Sun, 18 Jul 2010 02:59:42 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "33cb271d6f88b0abfc9054bcc4393986"
x-archive-orig-x-runtime: 153ms
x-archive-orig-content-length: 30973
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 18 Jul 2010 02:59:42 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 26 Nov 2009 02:48:25 GMT", ; rel="prev memento"; datetime="Sat, 05 Jun 2010 21:49:41 GMT", ; rel="memento"; datetime="Sun, 18 Jul 2010 02:59:42 GMT", ; rel="next memento"; datetime="Fri, 06 Aug 2010 16:39:50 GMT", ; rel="last memento"; datetime="Tue, 29 Jul 2025 20:02:10 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_16_20100718013518_crawl102-c/52_16_20100718025814_crawl101.arc.gz
server-timing: captures_list;dur=0.635391, exclusion.robots;dur=0.027834, exclusion.robots.policy;dur=0.016809, esindex;dur=0.012324, cdx.remote;dur=76.576361, LoadShardBlock;dur=118.020654, PetaboxLoader3.datanode;dur=107.678585, PetaboxLoader3.resolve;dur=124.487939, load_resource;dur=167.333503
x-app-server: wwwb-app201
x-ts: 200
x-tr: 457
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
gimite's web-socket-js at master - GitHub
gimite / web-socket-js
- Källkod
- Commits
- Nätverk (20)
- Ärenden (1)
- Nedladdningar (0)
- Wiki (1)
- Grafer
-
Branch:
master
klicka här för att lägga till en beskrivning
klicka här för att lägga till en hemsida
-
Växla branch (1)
- master ✓
- Växla taggar (0)
- Branch-lista
namn | ålder | meddelande | |
---|---|---|---|
![]() |
.gitignore | Sun Aug 09 22:58:40 -0700 2009 | Initial version. Checked only with Chrome. [gimite] |
![]() |
FABridge.js | Sun Aug 09 22:58:40 -0700 2009 | Initial version. Checked only with Chrome. [gimite] |
![]() |
README.txt | Wed Jul 07 06:50:26 -0700 2010 | Adding information about node.js implementation... [gimite] |
![]() |
WebSocketMain.swf | Fri Jul 02 21:07:49 -0700 2010 | Enabling polling only for Opera. Delaying Flash... [gimite] |
![]() |
flash-src/ | Fri Jul 02 21:07:49 -0700 2010 | Enabling polling only for Opera. Delaying Flash... [gimite] |
![]() |
sample.html | Fri Jul 02 21:07:49 -0700 2010 | Enabling polling only for Opera. Delaying Flash... [gimite] |
![]() |
swfobject.js | Sun Feb 28 17:12:32 -0800 2010 | Undo the hasty fix to swfobject by mistake. [mcav] |
![]() |
web_socket.js | Sat Jul 03 04:59:18 -0700 2010 | Adding more detailed troubleshooting. Showing e... [gimite] |
README.txt
* How to try Assuming you have Web server (e.g. Apache) running at https://example.com/ . - Download web_socket.rb from: https://github.com/gimite/web-socket-ruby/tree/master - Run sample Web Socket server (echo server) in example.com with: (#1) $ ruby web-socket-ruby/samples/echo_server.rb example.com 10081 - If your server already provides socket policy file at port 843, modify the file to allow access to port 10081. Otherwise you can skip this step. See below for details. - Publish the web-socket-js directory with your Web server (e.g. put it in ~/public_html). - Change ws://localhost:10081 to ws://example.com:10081 in sample.html. - Open sample.html in your browser. - After "onopen" is shown, input something, click [Send] and confirm echo back. #1: First argument of echo_server.rb means that it accepts Web Socket connection from HTML pages in example.com. * Troubleshooting If it doesn't work, try these: 1. Try Chrome and Firefox 3.x. - It doesn't work on Chrome: -- It's likely an issue of your code or the server. Debug your code as usual e.g. using console.log. - It works on Chrome but it doesn't work on Firefox: -- It's likely an issue of web-socket-js specific configuration (e.g. 3 and 4 below). - It works on both Chrome and Firefox, but it doesn't work on your browser: -- Check "Supported environment" section below. Your browser may not be supported by web-socket-js. 2. Use Developer Tools (Chrome/Safari) or Firebug (Firefox) to see if console.log outputs any errors. 3. Make sure you do NOT open your HTML page as local file e.g. file:///.../sample.html. web-socket-js doesn't work on local file. Open it via Web server e.g. https:///.../sample.html. 4. If you are NOT using web-socket-ruby as your WebSocket server, you need to place Flash socket policy file on your server. See "Flash socket policy file" section below for details. 5. Check if sample.html bundled with web-socket-js works. 6. Make sure the port used for WebSocket (10081 in example above) is not blocked by your server/client's firewall. 7. Install debugger version of Flash Player available here to see Flash errors: https://www.adobe.com/support/flashplayer/downloads.html * Supported environments It should work on: - Google Chrome 4 or later (just uses native implementation) - Firefox 3.x, Internet Explorer 8 + Flash Player 9 or later It may or may not work on other browsers such as Safari, Opera or IE 6. Patch for these browsers are appreciated, but I will not work on fixing issues specific to these browsers by myself. * Flash socket policy file This implementation uses Flash's socket, which means that your server must provide Flash socket policy file to declare the server accepts connections from Flash. If you use web-socket-ruby available at https://github.com/gimite/web-socket-ruby/tree/master , you don't need anything special, because web-socket-ruby handles Flash socket policy file request. But if you already provide socket policy file at port 843, you need to modify the file to allow access to Web Socket port, because it precedes what web-socket-ruby provides. If you use other Web Socket server implementation, you need to provide socket policy file yourself. See https://www.lightsphere.com/dev/articles/flash_socket_policy.html for details and sample script to run socket policy file server. node.js implementation is available here: https://github.com/LearnBoost/Socket.IO-node/blob/master/lib/socket.io/transports/flashsocket.js Actually, it's still better to provide socket policy file at port 843 even if you use web-socket-ruby. Flash always try to connect to port 843 first, so providing the file at port 843 makes startup faster. * Cookie considerations Cookie is sent if Web Socket host is the same as the origin of JavaScript. Otherwise it is not sent, because I don't know way to send right Cookie (which is Cookie of the host of Web Socket, I heard). Note that it's technically possible that client sends arbitrary string as Cookie and any other headers (by modifying this library for example) once you place Flash socket policy file in your server. So don't trust Cookie and other headers if you allow connection from untrusted origin. * Proxy considerations The WebSocket spec (https://tools.ietf.org/html/draft-hixie-thewebsocketprotocol) specifies instructions for User Agents to support proxied connections by implementing the HTTP CONNECT method. The AS3 Socket class doesn't implement this mechanism, which renders it useless for the scenarios where the user trying to open a socket is behind a proxy. The class RFC2817Socket (by Christian Cantrell) effectively lets us implement this, as long as the proxy settings are known and provided by the interface that instantiates the WebSocket. As such, if you want to support proxied conncetions, you'll have to supply this information to the WebSocket constructor when Flash is being used. One way to go about it would be to ask the user for proxy settings information if the initial connection fails. * How to build WebSocketMain.swf Install Flex 4 SDK: https://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4 $ cd flash-src $ ./build.sh * License New BSD License.