I'll first explain what I am trying to achieve.
I have made a custom circuit (PCB) by hand that does special functions. It connects to a Dell Wyse thin-client PC's serial port. Then I hook this thin-client to the internet via RJ45 cable and I make it a web server so that one of today's computers can easily control features on my circuit board.
Since on-board flash drive storage capacity is 128MB and I am using a regular monitor with a video adapter (VGA to DVI adapter) to see the screen, It is reasonable that I limit my OS to just DOS. No Windows or Linux.
For a large portion of the web server, I'm using webserv.bas quickbasic code from rubbermallet.org (
http://rubbermallet.org/software/webserv.html) along with trumpet TCP drivers and a packet driver.
So far, I can make as many web page requests from any of today's PC's to the thin client as I want as long as I wait a few seconds in-between each request, but sometimes waiting a few seconds might be a problem, especially when I have a page that requests multiple objects from the same server.
When I make too many requests in such a short time, the server locks up and I would have to
restart the entire computer to make the server run.
I know NTCPDRV (which is the trumpet driver I'm using) has asynchronous functions available for only the compatible packet drivers but I want to make something that works for everyone.
I feel one of my solutions is to chain to the existing DOS interrupt 1Ch because it automatically is called by DOS about 18 times a second I think. Then in that timer, I want to somehow create code that forces the webserver to restart or at least kill the webserver process if it locks up so I can modify a batch file to restart it.
The closest idea I came up with is that inside the 1Ch interrupt I could execute one of the below interrupts and override the CS value...
http://www.ctyme.com/intr/rb-2471.htmhttp://www.ctyme.com/intr/rb-2551.htm..then again, doesn't CS only equal the current running code segment and if i change it, the next instruction is executed from another area of ram?
So can anyone give me any ideas on how to solve this without me having to turn off and on the computer to make the server work every time someone decides to hold down F5 on a remote computer to constantly refresh a page? Remember, I'm working in a DOS 16-bit environment and only 2 interrupts are used. One for the packet driver and one for the trumpet (NTCPDRV) driver.