Manages Read and Write to and from the Network

/*
**	(c) COPYRIGHT MIT 1995.
**	Please first read the full copyright statement in the file COPYRIGH.
*/
This module defines the read and write functions to and from the network. As we are having reentrant function and a smarter network I/O this will get very small :-)

This module is implemented by HTSocket.c, and it is a part of the W3C Reference Library.

#ifndef HTSOCKET_H
#define HTSOCKET_H

#include "HTEvntrg.h"

Reading CRLF

The Library provides a default set of read routines that can handle the most common situations. However, before we start we make following definition is to make life easier when having a state machine looking for a <CRLF> sequence.
typedef enum _HTEOLState {
    EOL_ERR = -1,
    EOL_BEGIN = 0,
    EOL_FCR,
    EOL_FLF,
    EOL_DOT,
    EOL_SCR,
    EOL_SLF
} HTEOLState;

Load Data from a Socket

This function is a wrapper around the HTSocketRead() declared below. It provides a callback function for the event loop so that a socket can be loaded using non-blocking I/O. The function requires an open socket. It will typically be used in server applications or in a client application that can read directly from stdin.
extern HTEventCallback HTLoadSocket;
#endif

@(#) $Id: HTSocket.html,v 2.20 1996/04/12 17:48:49 frystyk Exp $