|
|
| Perl Monk, Perl Meditation | |
| PerlMonks |
Push HTTP server documentationby Corion (Patriarch) |
| on Jun 10, 2000 at 16:47 UTC ( [id://17517]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
mdillon gave this source code a deeper look and complained about the documentation or, more exact, the lack thereof. So I write this node to document the features of the above server a bit, that all of you might play with it. PurposeThis httpd server saw light as a proof-of-concept server for a database with highly volatile data. Such data was mostly read-only access from for example the status of the dial-up connection or the calling-party number. It was assumed that no locking of entries would be necessary as there would be only one defined writer for each node and rapid updating would be always possible. Command setThe command set was more or less oriented at what http 1.1 provided, but also allows for server-side notification of clients so that constant polling would be unnecessary. GET itemname GET KEYS SET itemname SET TEST Content-Length:10 abc defgh UNSET itemname BYE DIE RESTART CLONE SOURCE itemname SET passwd `cat /etc/passwd` SOURCE passwd The purpose of this command was to faciliate populating the %Status hash with new code, like the code for
the KEYS item or the WHO item.
Example
SET code
Content-Length: ??? <-- fix this
sub return_test{
return join(" ", keys %SpecialHash );
};
$Status{test} = \&return_test;
This would add a new item, test, that executes the code stored in &return_test every time the item
is requested.
In Section
Code Catacombs
|
|
||||||||||||||||||||||||||||||||