jWebSocket Web Client

This section describes how to use the jWebSocket Client and start the demo web site. The jWebSocket Client is based on pure JavaScript. All browsers that already provide native WebSocket support do not require any plug-ins. You even can run the demo web site from a local file system, i.e. you do not need to install any web server. Please refer to our browsers page, to see which browsers already support native WebSockets.

All browser that do not yet provide native WebSocket support automatically embed the FlashBridge, this is completely transparent and your application does not need to take care of this. Once the browser implements the WebSocket class the native class is used and the FlashBridge is automatically turned off. However, the FlashBridge requires the Adobe Flash Player plug-in and a web server like Apache, because the plug-in does not support the file protocol.

If you are not sure whether your favorite browser supports WebSockets please refer to our jWebSocket Cross-Browser Compatibility page.

Setup the jWebSocket Client on a Local File System

To run the jWebSocket Client on your MS Windows file system please...

  1. Create a folder of your choice (e.g. c:\jWebSocket ).
  2. Download the jWebSocketClient-<version>.zip from the download area and unzip it into this folder, the archive includes a jWebSocketClient-<version>folder, so that you do not need to create this manually.
  3. Start your browser (please refer to Cross-Browser-Compatibility).
  4. Typefile:///[path/to/client/]index.html
    (e.g. file:///c:/jWebSocket/jWebSocketClient-<version>/index.html) into the URL input field of the browser.
  5. The browser opens the Welcome page of the jWebSocket client. You now can test all the jWebSocket demos.


Starting the jWebSocket Client demo web site on a local hard disk

Setup the jWebSocket Client on an Apache Web Server (recommended)

To run the jWebSocket Client in an Apache 2.2 Web Server Environment please...

  1. Create a folder of your choice (e.g. c:\jWebSocket ).
  2. Download the jWebSocketClient-<version>.zip from the download area and unzip it into this folder, the archive includes a jWebSocketClient-<version> folder, so that you do not need to create this manually.
  3. Add the following lines to the <VirtualHost> section of your web site in Apache's httpd.conf file (jwc = jWebSocket Web Client).
    Alias /jwc "c:/jWebSocket/client" <Directory "c:/jWebSocket/client" > Order allow,deny
    Allow from all
    </Directory>
  4. Also ensure that you specified the index.html file in the DirectoryIndex list within the httpd.conf:
    <IfModule dir_module>
    DirectoryIndex index.htm index.html index.jsp index.php
    </IfModule>
  5. Restart Apache once to apply the new settings.
  6. Start your browser (please refer to Cross-Browser-Compatibility).
  7. Type http://[url/to/client/]jwc/index.htm
    (e.g. http://localhost/jwc/index.html) into the URL input field of the browser.
  8. The browser opens the Welcome page of the jWebSocket Client. You now can test all the jWebSocket demos.
  9. Please open port 80 in your firewall for http requests, port 8787 for incoming WebSocket requests as well as port 843 to support the policy-file-request of the FlashBridge, if you plan to access the website from other systems than your local host.
Publications

Learn more about WebSockets in general, get background information and gain deeper insight!

Join jWebSocket

Wether developer, designer or translator – join the jWebSocket team and grow together with our success!

Copyright © 2013 Innotrade GmbH. All rights reserved.