Please note: This software is long out of date, and I'm afraid I do not have the time to update it. I am leaving this page here as a reference because of the project's popularity. Please do not contact me about this project.
A more recent fork of this project is now on GitHub thanks to Ian Hilt.
See It in Action
Check out this simple example. Pressing the "Run!" button establishes a connection to google.com on port 80 and sends a nonsense request. It then gets the response text and displays it on the page (don't worry, it's supposed to be an error). View the page source to see how elegant the code is.
Here. Source code is included in case you want to see how it works or need to compile it yourself.
How To Use It
Include the Java applet in the body of your HTML document:
<applet id="JavaSocketBridge" archive="JavaSocketBridge.jar" code="JavaSocketBridge.class" width="0" height="0"> </applet>
Connect to a given url (string) on a given port (integer). Returns true or false depending on success.
Disconnect the current socket. Returns true or false depending on success.
Send a string over the socket. Returns true or false depending on success.
This method is called by the applet every time something comes over the socket from the server. It is blank by default, so overwrite it to handle input.
This method is called by the applet every time an error crops up. It alerts you with the error description by default, so overwrite it to handle errors.