Saturday, June 09, 2007

Local Web Server GUI

Here is simple proof of concept for using a local web server as a GUI. The code is here and yes I know it's freakin' Java. The reason being is that socket stuff in C and C++ isn't cross platform(Windows throws away standards and uses garbage like WinSock, and yes it is completely stupid and anti-competitive of them). To run it simply do the following:
  1. javac WebServer.java
  2. java WebServer
  3. Then point your browser to localhost
  4. To kill the server type murder in the text box
It's a very silly little program, but at least it does what it's supposed to(Take input locally from the browser). Below is a screenshot of it running in all it's glory:



Another nice thing about this setup as opposed to a normal application, that instead of minimizing, iconifying, or putting it in the system tray to get rid of it but still have it running, you can simply navigate away from the page and then come back later.

No comments: