URL: https://www.w3.org/Daemon/old/V0.1/daemon.c
/* TCP/IP based server for HyperText TCPServer.c
** ---------------------------------
**
** History:
** 2 Oct 90 Written TBL. Include filenames for VM from RTB.
*/
/* Module parameters:
** -----------------
**
** These may be undefined and redefined by syspec.h
*/
#define LISTEN_BACKLOG 2 /* Number of pending connect requests (TCP)*/
#define MAX_CHANNELS 20 /* Number of channels we will keep open */
#define BUFFER_SIZE 4096 /* Arbitrary size for efficiency */
#define WILDCARD '*' /* Wildcard used in addressing */
#define NETCLOSE close /* Routine to close a TCP-IP socket */
#define NETREAD read /* Routine to read from a TCP-IP socket */
#define NETWRITE write /* Routine to write to a TCP-IP socket */
#define FIRST_TCP_PORT 5000 /* When using dynamic allocation */
#define LAST_TCP_PORT 5999
#ifdef NeXT
#define SELECT /* Handle >1 channel if we can. */
#include