This past week, I got around to using a program I wrote and used
last year for my Networks II course. Last year I reported on this
here:
http://groups.yahoo.com/group/waterlanguage/message/534
This year it went very well. I love how easy it is to implement mini-
web servers in Water/SteamXML.
I ran my C program in a console window on Windows XP Pro, and
launched SteamXML from the desktop to run my little server program.
The C program registers a Netbios name, and then waits for direct
Netbios datagrams to come in from the students. (This could be done
with TCP/IP examples as well.) Once students have sent their
datagram to my machine, they can open a browser and connect to my
machine to see on a web page whether the datagram arrived or not.
The C program writes the data out to ConciseXML using simple fprintf
() statements. Something like this:
fprintf(outfile,
"<message_entry\n name=<string>%s</string>\n",name);
fprintf(outfile,
" message=<string>%s</string>\n/>\n", message );
The Water program reads this data file and SteamXML takes care of
parsing the data automatically; then I can simply use a <for_each />
statement to loop through the data and display all the information
as a web page.
Yes, we could have done this all in C, or on a machine that already
had a web server running on it, but this way is much more portable.
I can set up any machine as a temporary dynamic web server with
SteamXML and it is ready to do what I want!
_Merrick