version 2.17, 1995/09/12 23:39:34
|
version 2.18, 1995/09/16 21:25:14
|
Line 1
|
Line 1
|
<HTML> |
<HTML> |
<HEAD> |
<HEAD> |
<TITLE>Asyncronous Socket Management</TITLE> |
<TITLE>Asyncronous Socket Management</TITLE> |
<!-- Changed by: Henrik Frystyk Nielsen, 12-Sep-1995 --> |
<!-- Changed by: Henrik Frystyk Nielsen, 14-Sep-1995 --> |
</HEAD> |
</HEAD> |
<BODY> |
<BODY> |
|
|
Line 30 Reference Library</A>.
|
Line 30 Reference Library</A>.
|
#ifndef HTNET_H |
#ifndef HTNET_H |
#define HTNET_H |
#define HTNET_H |
#include "HTReq.h" |
#include "HTReq.h" |
#include "HTEvntrg.h" |
|
#include "HTSocket.h" |
|
</PRE> |
</PRE> |
|
|
<H2>The HTNet Object</H2> |
<H2>The HTNet Object</H2> |
Line 42 descriptor, the input read buffer etc. r
|
Line 40 descriptor, the input read buffer etc. r
|
service a request. <P> |
service a request. <P> |
|
|
<PRE> |
<PRE> |
typedef struct _HTNet { |
typedef struct _HTNet HTNet; |
SOCKFD sockfd; /* Socket descripter */ |
|
SockA sock_addr; /* SockA is defined in tcp.h */ |
|
HTInputSocket * isoc; /* Input buffer */ |
|
HTStream * target; /* Target stream */ |
|
int addressCount; /* Attempts if multi-homed host */ |
|
time_t connecttime; /* Used on multihomed hosts */ |
|
long bytes_read; /* Bytes read from network */ |
|
BOOL preemtive; /* Eff result from Request and Protocol */ |
|
BOOL persistent; /* Do persistent connection? */ |
|
HTPriority priority; /* Priority of this request (event) */ |
|
HTEventCallBack * cbf; /* Library load routine */ |
|
HTRequest * request; /* Link back to request structure */ |
|
void * context; /* Protocol Specific context */ |
|
} HTNet; |
|
|
|
#define HTNet_bytesRead(me) ((me) ? (me)->bytes_read : -1) |
|
</PRE> |
</PRE> |
|
|
<H2>Request Termination Call Back Functions</H2> |
<H2>Request Termination Call Back Functions</H2> |