Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
Readme.txt | 2010-02-11 | 1.5 kB | |
test.html | 2010-02-11 | 963 Bytes | |
pyserver.py | 2010-02-11 | 694 Bytes | |
nsIClientSocket.idl | 2010-02-11 | 396 Bytes | |
nsIClientSocket.xpt | 2010-02-11 | 342 Bytes | |
ClientSocket.py | 2010-02-11 | 1.5 kB | |
Totals: 6 Items | 5.4 kB | 0 |
This here XPCOM component enables you to build clientsockets in javascript in Firefox. Installation: Make sure you have the python extension for Firefox (PythonExt). These are the Python XPCOM bindings. It can be added to Firefox like any other Add-on. Make also sure that you have python installed (version 2.6) to be able to start the testserver pyserver.py. Then copy the nsIClientSocket.xpt file and the pythonscript ClientSocket.py to the components folder of Firefox. On linux it should be somewhere in the /usr/lib/firefox-<version> directory. On windows somewhere in C:\Program files\Mozilla Firefox Then delete the files compreg.dat and xpti.dat in your profile folder. On linux it is somewhere in the /home/,username>/.mozilla. On windows somewhere in C:\Documents and Settings\<username>\Application Data\ folder (Windows XP/2000) Start the pyserver.py script with python. Open the test.html page in Firefox and get your server client system up and running. Be aware that firefox comes up with an Internet Security alert. Press Allow and by entering text in the html page and pushing Send Message you can communicate with the server. In javascript you can set the ip address and port of the server you connect to. In javascript you can set the message to be sended and retrieve the message sended by the server. Examine the sources to find out how everything functions. The ultimate intention is to use Firefox as the HMI for the DCS system. (By using SVG etc.)