PROTOTYPE
IMPLEMENTATION OF THE PROPOSED WEBSOCKET 06 DRAFT SPECIFICATION
draft-ietf-hybi-thewebsocketprotocol-06
RUNNING THE SAMPLES
In order to run the included web chat, stock quote or game samples you need to set up the server machine in the following way:
1. Enable Internet Information Services (IIS) on the machine.
2. Allow incoming TCP traffic on port 4502 in the Windows Firewall.
3. For each sample you want to run, Host the clientaccesspolicy.xml file over HTTP at the root of the domain where the sample applications will be hosted. One quick way to do it is to copy clientaccesspolicy.xml to %SystemDrive%\inetpub\wwwroot, assuming you are using the default root directory with your IIS installation (all samples use the same clientaccesspolicy file so one will work for all samples).
4. Make sure the clientaccesspolicy.xml file is accessible by navigating to http://localhost/clientaccesspolicy.xml from a browser window on the server machine.
5. Compile the code for each sample you want to run and then copy the
ChatService.exe,
EchoService.exe or GameService.exe from the directory bin\debug
or bin\release directories to the web directory that will be used by IIS to run
the sample.
Note: the gameservice.exe uses a config file that can be used to specify the hostname where
the service is running, by default it is set to localhost.
If you plan to run the service from a machine other than localhost
you need to change the setting in the config file.
Run a web chat or a stock quote sample on a client machine as follows:
1. Make sure client machine has Silverlight 4 installed. You can install it from http://www.silverlight.net/getstarted/.
2. To run the web chat sample, navigate to http://<server-machine>/chat/wsdemo.html in a browser on the client. The client connects to the server using WebSockets as soon as the page is loaded. When you type messages you should see them reflected back to you. You should also see any messages typed in other browser windows pointed at that URL.
3. To run the stock quote sample, navigate to
http://<server-machine>/subscription/wsdemo.html on the client. Type in
one of the stock tickers listed on the page (e.g. ‘msft’).
This should establish a WebSocket connection to the
server and you should start receiving notifications every second. When you type
in a different stock symbol, the existing WebSocket
connection will be closed and a new WebSocket
connection created to receive stock quotes for the new symbol.
4. To run the Game sample, navigate to http://<server-machine>/game/wsdemo.html. If the game service is running on another machine you need to edit wsdemo.html and update the servername variable in the script section with the name of the server where the game service is running. You can also change other game params