Annotation of libwww/Library/src/HTSocket.html, revision 2.21

2.1       frystyk     1: <HTML>
                      2: <HEAD>
2.21    ! eric        3:   <!-- Changed by: Henrik Frystyk Nielsen,  5-Apr-1996 -->
        !             4:   <NEXTID N="z18">
        !             5:   <TITLE>W3C Reference Library libwww Socket Interface</TITLE>
2.1       frystyk     6: </HEAD>
                      7: <BODY>
2.21    ! eric        8: <H1>
        !             9:   Manages Read and Write to and from the Network
        !            10: </H1>
2.1       frystyk    11: <PRE>
                     12: /*
                     13: **     (c) COPYRIGHT MIT 1995.
                     14: **     Please first read the full copyright statement in the file COPYRIGH.
                     15: */
                     16: </PRE>
2.21    ! eric       17: <P>
        !            18: This module defines the read and write functions to and from the network.
        !            19: As we are having reentrant function and a smarter network I/O this will get
        !            20: very small :-)
        !            21: <P>
        !            22: This module is implemented by <A HREF="HTSocket.c">HTSocket.c</A>, and it
        !            23: is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C Reference
        !            24: Library</A>.
2.1       frystyk    25: <PRE>
                     26: #ifndef HTSOCKET_H
                     27: #define HTSOCKET_H
                     28: 
2.21    ! eric       29: #include <A HREF="HTReq.html">"HTEvent.h"</A>
2.1       frystyk    30: </PRE>
2.21    ! eric       31: <H2>
        !            32:   Reading CRLF
        !            33: </H2>
        !            34: <P>
        !            35: The Library provides a default set of read routines that can handle the most
        !            36: common situations. However, before we start we make following definition
        !            37: is to make life easier when having a state machine looking for a
        !            38: <CODE>&lt;CRLF&gt;</CODE> sequence.
2.1       frystyk    39: <PRE>
2.18      frystyk    40: typedef enum _HTEOLState {
2.1       frystyk    41:     EOL_ERR = -1,
                     42:     EOL_BEGIN = 0,
                     43:     EOL_FCR,
                     44:     EOL_FLF,
                     45:     EOL_DOT,
                     46:     EOL_SCR,
                     47:     EOL_SLF
2.18      frystyk    48: } HTEOLState;
                     49: </PRE>
2.21    ! eric       50: <H2>
        !            51:   Load Data from a Socket
        !            52: </H2>
        !            53: <P>
        !            54: This function is a wrapper around the <CODE>HTSocketRead()</CODE> declared
        !            55: below. It provides a callback function for the <A HREF="HTEvntrg.html">event
        !            56: loop</A> so that a socket can be loaded using non-blocking I/O. The function
        !            57: requires an <B>open</B> socket. It will typically be used in server applications
        !            58: or in a client application that can read directly from <CODE>stdin</CODE>.
2.2       frystyk    59: <PRE>
2.18      frystyk    60: extern HTEventCallback HTLoadSocket;
2.9       frystyk    61: </PRE>
                     62: <PRE>
2.1       frystyk    63: #endif
                     64: </PRE>
2.21    ! eric       65: <P>
        !            66:   <HR>
2.20      frystyk    67: <ADDRESS>
2.21    ! eric       68:   @(#) $Id: HTSocket.html,v 2.20 1996/04/12 17:48:49 frystyk Exp $
2.20      frystyk    69: </ADDRESS>
2.21    ! eric       70: </BODY></HTML>

Webmaster