This technical brief describes the inner workings of the generic hypertext daemon (server) program. As a core component of the WorldWideWeb project, it handles requests across the multiverse via TCP connections.
Related developer resources:
- User Guide: Operation and configuration.
- Bugs & Features: Tracking known issues and wishlists.
- Other Servers: Documentation for specific server flavors.
Implementation Logic
The hypertext daemon, similar to the FTP daemon, responds to an incoming TCP connection to provide hypermedia services to the caller. The primary control loop manages how connections are handled based on the underlying architecture.
The SELECT Option
A compilation option (SELECT) controls whether more than one connection can be handled at a time. This is dependent on whether the TCP/IP implementation provides a working select() routine.
- If enabled, the daemon can manage multiple simultaneous listeners.
- If disabled, the implementation services one connection and drops it before accepting another.
Note that in neither case does the daemon concurrently serve two clients or fork off processes to handle multiple requests simultaneously.
Source Modules
The core logic is modularized to allow for different server flavors while sharing common WorldWideWeb libraries:
- Main Loop: Located in
HTDaemon.c. - Request Handling: Specific modules like
HTRetrieve.ccontain the code to process individual requests. - Common Code: Utilizes various modules from the W3 common library for network access and format negotiation.