version 2.2, 1996/04/14 01:23:20
|
version 2.3, 1996/05/20 15:07:08
|
Line 1
|
Line 1
|
<HTML> |
<HTML> |
<HEAD> |
<HEAD> |
<TITLE>W3C Reference Library Socket Read Stream</TITLE> |
<!-- Changed by: Henrik Frystyk Nielsen, 12-Apr-1996 --> |
<!-- Changed by: Henrik Frystyk Nielsen, 12-Apr-1996 --> |
<NEXTID N="z18"> |
<NEXTID N="z18"> |
<TITLE>W3C Reference Library Socket Reader Stream</TITLE> |
</HEAD> |
</HEAD> |
<BODY> |
<BODY> |
|
<H1> |
<H1>Manages Read and Write to and from the Network</H1> |
Socket Reader Stream |
|
</H1> |
<PRE> |
<PRE> |
/* |
/* |
** (c) COPYRIGHT MIT 1995. |
** (c) COPYRIGHT MIT 1995. |
** Please first read the full copyright statement in the file COPYRIGH. |
** Please first read the full copyright statement in the file COPYRIGH. |
*/ |
*/ |
</PRE> |
</PRE> |
|
<P> |
This module defines the read and write functions to and from the |
The Socket Reader Stream is an <A HREF="HTIOStream.html">input stream |
network. As we are having reentrant function and a smarter network I/O |
</A> which knows how to read from a BSD type socket. It is part |
this will get very small :-) <P> |
of the <A HREF="WWWTrans.html">Transport interface </A>and may be registered |
|
as part of a <A HREF="HTTrans.html">Transport Object</A>. The application |
This module is implemented by <A HREF="HTReader.c">HTReader.c</A>, and |
can initialize this stream together with the |
it is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C |
<A HREF="HTWriter.html">HTWriter stream</A>, for example. In the |
Reference Library</A>. |
<A HREF="HTInit.html">default initialization module</A>, you can find the |
|
<CODE>HTTransportInit()</CODE> function which sets up this stream as a default |
|
transport for handling socket read operations. |
|
<P> |
|
This module is implemented by <A HREF="HTReader.c">HTReader.c</A>, and it |
|
is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C Reference |
|
Library</A>. |
<PRE> |
<PRE> |
#ifndef HTREADER_H |
#ifndef HTREADER_H |
#define HTREADER_H |
#define HTREADER_H |
|
|
#include <A HREF="HTIOStream.html">"HTIOStream.h"</A> |
#include <A HREF="HTIOStream.html">"HTIOStream.h"</A> |
</PRE> |
</PRE> |
|
<H2> |
<H2>Input Buffering</H2> |
Input Buffering |
|
</H2> |
In order to optimize reading a channel, we bind a buffer to each |
<P> |
channel object. The size of this buffer is a compromise between speed |
In order to optimize reading a channel, we bind a buffer to each channel |
and memory. Here it is chosen as the default TCP High Water Mark |
object. The size of this buffer is a compromise between speed and memory. |
(sb_hiwat) for receiving data. By default, we have chosen a value that |
Here it is chosen as the default TCP High Water Mark (sb_hiwat) for receiving |
equals the normal TCP High Water Mark (sb_hiwat) for receiving data. |
data. By default, we have chosen a value that equals the normal TCP High |
|
Water Mark (sb_hiwat) for receiving data. |
<PRE> |
<PRE> |
#define INPUT_BUFFER_SIZE 8192 |
#define INPUT_BUFFER_SIZE 8192 |
</PRE> |
</PRE> |
|
<H2> |
<H2>Read Stream</H2> |
Read Stream |
|
</H2> |
|
|
<PRE> |
<PRE> |
extern HTInput_new HTReader_new; |
extern HTInput_new HTReader_new; |
</PRE> |
</PRE> |
|
|
<PRE> |
<PRE> |
#endif |
#endif |
</PRE> |
</PRE> |
|
|
<P> |
<P> |
<HR> |
<HR> |
<ADDRESS> |
<ADDRESS> |
@(#) $Id$ |
@(#) $Id$ |
</ADDRESS> |
</ADDRESS> |
</BODY> |
</BODY></HTML> |
</HTML> |
|