Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2344 of /home/paradi35/public_html/includes/menu.inc).

serial port webserver

I want to make useful APIs in a bunch of languages for a project that needs to use a computers serial port. Few languages include platform independent serial libraries and I wanted to avoid writing lots of the same code in different languages. Most languages include some way of sending requests and reading websites so I made a webserver that would parse incoming get requests and write data out of the serial port. The server blocks until it can read the complete response from the serial port, then parses that and writes a response back to the calling application over the network.

The goal is to serialize and transmit some data that will be cast as a struct on an attached microcontroller. I figured the most flexible way of sending messages was to make the port available at an address on my local network and add in a scripting layer to parse http requests and build the http responses. While I want this to be as platform independent as possible this version uses the .net framework and ironpython instead of the original C++ and lua after being stuck trying to get boost::asio ports working for a couple days.

Currently the system works like this:
  client tries to load localhost:8000/this_is_some_data_that_will_parsed
    server picks this up -> 
    server calls parseHttpRequest(this_is_some_data_that_will_be_parsed) in ironpython->
      python returns an list containing integers 0-255 ->
    server casts that list into a byte array and sends it out the serial port ->
    server waits until it has a response as large as the sent message ->
    server casts the response as a list of integers 0-255 ->
    server calls buildHttpResponse(list of integers) in ironpython ->
      python returns a string to send back to the client ->
    server writes string back to client ->
  client loads something like: your device said "hello"

All of this is done one request at a time in a single thread, I don't want to overflow the serial buffer on the microcontroller with a bunch of requests.

Downloads:
c# server program: v0.1
python parsing script: example
arduino example :