Annotation of libwww/Library/src/HTHstMan.html, revision 1.1.2.2
1.1.2.1 eric 1: <HTML>
2: <HEAD>
3: <!-- Changed by: Henrik Frystyk Nielsen, 19-May-1996 -->
4: <TITLE>W3C Reference Library libwww Private Hst Definition</TITLE>
5: </HEAD>
6: <BODY>
7: <H1>
8: Private Host Definition
9: </H1>
10: <PRE>
11: /*
12: ** (c) COPYRIGHT MIT 1995.
13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
16: <P>
17: This is the private definition of the Host Class. Please look in the public
18: <A HREF="HTHost.html">Host Class</A> for more documentation
19: <P>
20: This module is implemented by <A HREF="HTHost.c">HTHost.c</A>, and it is a
21: part of the <A HREF="http://www.w3.org/pub/WWW/Library/">W3C Reference
22: Library</A>.
23: <PRE>
24: #ifndef HTHSTMAN_H
25: #define HTHSTMAN_H
1.1.2.2 ! frystyk 26: #include "WWWMux.h"
1.1.2.1 eric 27: #include "HTHost.h"
28: #include "HTDNS.h"
29: #include "HTEvent.h"
30: #include "HTProt.h"
31:
32: #define PIPE_BUFFER_SIZE 8192
33: </PRE>
34: <P>
35: The <CODE>HTHost</CODE> object is the core of the request queue management.
36: This object contains information about the socket descriptor, the input read
37: buffer etc. required to identify and service a request.
38: <PRE>
39: typedef enum _TCPState {
40: TCP_ERROR = -2,
41: TCP_CONNECTED = -1,
42: TCP_BEGIN = 0,
43: TCP_CHANNEL,
44: TCP_DNS,
45: TCP_NEED_SOCKET,
46: TCP_NEED_BIND,
47: TCP_NEED_LISTEN,
48: TCP_NEED_CONNECT
49: } TCPState;
50:
51: struct _HTHost {
52: /* the old stuff */
53: char * hostname; /* name of host + optional port */
54: time_t ntime; /* Creation time */
55: char * type; /* Peer type */
56: int version; /* Peer version */
57: HTMethod methods; /* Public methods (bit-flag) */
58: char * server; /* Server name */
59: char * user_agent; /* User Agent */
60: char * range_units; /* ??? */
61: HTChannel * channel; /* data channel */
1.1.2.2 ! frystyk 62: HTMuxChannel * muxch; /* Mux channel */
1.1.2.1 eric 63: FILE * fp; /* If we can't use a socket */
64: HTList * pipeline; /* Pipe line of net objects */
65: HTList * pending; /* List of pending Net objects */
66: BOOL persistent;
67: time_t expires; /* Persistent channel expires time */
68:
69: /* Connection dependent stuff */
70: HTdns * dns; /* Link to DNS object */
71: TCPState tcpstate; /* State in connection */
72: SockA sock_addr; /* SockA is defined in sysdep.h */
73: int retry; /* Counting attempts to connect */
74: int home; /* Current home if multiple */
75: time_t connecttime; /* Used on multihomed hosts */
76:
77: HTTransportMode mode; /* Supported mode */
78: HTEvent events[2]; /* reading and writing may differ */
79: HTEvent_type registeredFor; /* Which actions are we blocked on */
80: size_t remainingRead; /* Tells HostEvent to call next net */
81:
82: /* User specific stuff */
83: void * context; /* Protocol Specific context */
84: };
85:
86: #define HTHost_bytesRead(me) ((me) ? (me)->bytes_read : -1)
87: #define HTHost_bytesWritten(me) ((me) ? (me)->bytes_written : -1)
88:
89: #define HTHost_setBytesRead(me,l) ((me) ? (me->bytes_read=(l)) : -1)
90: #define HTHost_setBytesWritten(me,l) ((me) ? (me->bytes_written=(l)) :-1)
91: #define HTHost_setDNS (host, dns) ((me) ? (me->dns=(dns)) :-1)
92: </PRE>
93:
94: <PRE>
95: #endif /* HTHSTMAN_H */
96: </PRE>
97: <P>
98: <HR>
99: <ADDRESS>
1.1.2.2 ! frystyk 100: @(#) $Id: HTHstMan.html,v 1.1.2.1 1996/10/29 21:27:41 eric Exp $
1.1.2.1 eric 101: </ADDRESS>
102: </BODY></HTML>
Webmaster