version 2.66, 1995/11/20 17:57:09
|
version 2.67, 1995/11/22 23:34:43
|
Line 45
|
Line 45
|
/* x seconds penalty on a multi-homed host if IP-address is timed out */ |
/* x seconds penalty on a multi-homed host if IP-address is timed out */ |
#define TCP_DELAY 600 |
#define TCP_DELAY 600 |
|
|
/* Max number of non-blocking accepts */ |
|
#define MAX_ACCEPT_POLL 30 |
|
|
|
#ifndef RESOLV_CONF |
#ifndef RESOLV_CONF |
#define RESOLV_CONF "/etc/resolv.conf" |
#define RESOLV_CONF "/etc/resolv.conf" |
#endif |
#endif |
|
|
#ifdef __svr4__ |
|
#define HT_BACKLOG 32 /* Number of pending connect requests (TCP) */ |
|
#else |
|
#define HT_BACKLOG 5 /* Number of pending connect requests (TCP) */ |
|
#endif /* __svr4__ */ |
|
|
|
PRIVATE char *hostname = NULL; /* The name of this host */ |
PRIVATE char *hostname = NULL; /* The name of this host */ |
|
|
PRIVATE char *mailaddress = NULL; /* Current mail address */ |
PRIVATE char *mailaddress = NULL; /* Current mail address */ |
|
|
/* ------------------------------------------------------------------------- */ |
/* ------------------------------------------------------------------------- */ |
Line 863 PUBLIC int HTDoConnect (HTNet * net, cha
|
Line 853 PUBLIC int HTDoConnect (HTNet * net, cha
|
** HT_OK if connected |
** HT_OK if connected |
** HT_WOULD_BLOCK if operation would have blocked |
** HT_WOULD_BLOCK if operation would have blocked |
*/ |
*/ |
PUBLIC int HTDoAccept (HTNet * net, SOCKFD * newfd) |
PUBLIC int HTDoAccept (HTNet * net, SOCKET * newfd) |
{ |
{ |
int status; |
int status; |
int size = sizeof(net->sock_addr); |
int size = sizeof(net->sock_addr); |
Line 922 PUBLIC int HTDoAccept (HTNet * net, SOCK
|
Line 912 PUBLIC int HTDoAccept (HTNet * net, SOCK
|
** returns HT_ERROR Error has occured or interrupted |
** returns HT_ERROR Error has occured or interrupted |
** HT_OK if connected |
** HT_OK if connected |
*/ |
*/ |
PUBLIC int HTDoListen (HTNet * net, u_short port, SOCKFD master) |
PUBLIC int HTDoListen (HTNet * net, u_short port, SOCKET master, int backlog) |
{ |
{ |
int status; |
int status; |
|
|
Line 1040 PUBLIC int HTDoListen (HTNet * net, u_sh
|
Line 1030 PUBLIC int HTDoListen (HTNet * net, u_sh
|
break; |
break; |
|
|
case TCP_NEED_LISTEN: |
case TCP_NEED_LISTEN: |
status = listen(net->sockfd, HT_BACKLOG); |
status = listen(net->sockfd, backlog); |
#ifdef _WINSOCKAPI_ |
#ifdef _WINSOCKAPI_ |
if (status == SOCKET_ERROR) |
if (status == SOCKET_ERROR) |
#else |
#else |