Annotation of libwww/Library/src/HTNetMan.html, revision 2.1
2.1 ! frystyk 1: <HTML>
! 2: <HEAD>
! 3: <TITLE>Asyncronous Socket Management</TITLE>
! 4: <!-- Changed by: Henrik Frystyk Nielsen, 16-Sep-1995 -->
! 5: </HEAD>
! 6: <BODY>
! 7:
! 8: <H1>Asyncronous Socket Management</H1>
! 9:
! 10: <PRE>
! 11: /*
! 12: ** (c) COPYRIGHT MIT 1995.
! 13: ** Please first read the full copyright statement in the file COPYRIGH.
! 14: */
! 15: </PRE>
! 16:
! 17: This module contains the routines for handling the set of active
! 18: sockets currently in use by the multithreaded clients. It is an
! 19: internal module to the Library, the application interface is
! 20: implemented in the <A HREF="HTEvntrg.html">Event Module</A>. Look for
! 21: more information in the <A
! 22: HREF="http://www.w3.org/pub/WWW/Library/User/Architecture/">
! 23: Multithread Specifications</A>. <P>
! 24:
! 25: This module is implemented by <A HREF="HTNet.c">HTNet.c</A>, and it is
! 26: a part of the <A HREF="http://www.w3.org/pub/WWW/Library/">W3C
! 27: Reference Library</A>.
! 28:
! 29: <PRE>
! 30: #ifndef HTNETMAN_H
! 31: #define HTNETMAN_H
! 32: #include "HTNet.h"
! 33: #include "HTDNS.h"
! 34: #include "HTEvntrg.h"
! 35: #include "HTSocket.h"
! 36: </PRE>
! 37:
! 38: <H2>The HTNet Object</H2>
! 39:
! 40: The <CODE>HTNet</CODE> object is the core of the request queue
! 41: management. This object contains information about the socket
! 42: descriptor, the input read buffer etc. required to identify and
! 43: service a request. <P>
! 44:
! 45: <PRE>
! 46: struct _HTNet {
! 47: SOCKFD sockfd; /* Socket descripter */
! 48: SockA sock_addr; /* SockA is defined in tcp.h */
! 49: HTInputSocket * isoc; /* Input buffer */
! 50: HTdns * dns; /* Entry in DNS table */
! 51: HTStream * target; /* Target stream */
! 52: int retry; /* Counting attempts to connect */
! 53: int home; /* Current home if multiple */
! 54: time_t connecttime; /* Used on multihomed hosts */
! 55: long bytes_read; /* Bytes read from network */
! 56: BOOL preemtive; /* Eff result from Request and Protocol */
! 57: HTPriority priority; /* Priority of this request (event) */
! 58: HTEventCallBack * cbf; /* Library load routine */
! 59: HTRequest * request; /* Link back to request structure */
! 60: void * context; /* Protocol Specific context */
! 61: };
! 62:
! 63: #define HTNet_bytesRead(me) ((me) ? (me)->bytes_read : -1)
! 64: #define HTNet_dns(me) ((me) ? (me)->dns : NULL)
! 65: </PRE>
! 66:
! 67: <PRE>
! 68: #endif /* HTNETMAN_H */
! 69: </PRE>
! 70:
! 71: End of declaration module
! 72: </BODY>
! 73: </HTML>
! 74:
! 75:
Webmaster