version 2.37, 1995/11/27 03:05:05
|
version 2.38, 1995/12/07 00:06:58
|
Line 350 PUBLIC HTNet * HTNet_new (HTRequest * re
|
Line 350 PUBLIC HTNet * HTNet_new (HTRequest * re
|
** more than HTMaxActive connections already then return NO. |
** more than HTMaxActive connections already then return NO. |
** Returns YES if OK, else NO |
** Returns YES if OK, else NO |
*/ |
*/ |
PUBLIC BOOL HTNet_newServer (HTRequest * request) |
PUBLIC BOOL HTNet_newServer (HTRequest * request, SOCKET sockfd) |
{ |
{ |
HTNet * me; |
HTNet * me; |
HTProtocol * protocol; |
HTProtocol * protocol; |
Line 371 PUBLIC BOOL HTNet_newServer (HTRequest *
|
Line 371 PUBLIC BOOL HTNet_newServer (HTRequest *
|
if ((me = create_object(request)) == NULL) return NO; |
if ((me = create_object(request)) == NULL) return NO; |
me->preemtive = (HTProtocol_preemtive(protocol) || request->preemtive); |
me->preemtive = (HTProtocol_preemtive(protocol) || request->preemtive); |
me->priority = request->priority; |
me->priority = request->priority; |
me->sockfd = INVSOC; |
me->sockfd = sockfd; |
if (!(me->cbf = HTProtocol_server(protocol))) { |
if (!(me->cbf = HTProtocol_server(protocol))) { |
if (WWWTRACE) TTYPrint(TDEST, "HTNet_new... NO CALL BACK FUNCTION!\n"); |
if (WWWTRACE) TTYPrint(TDEST, "HTNet_new... NO CALL BACK FUNCTION!\n"); |
free(me); |
free(me); |
Line 693 PUBLIC BOOL HTNet_killAll (void)
|
Line 693 PUBLIC BOOL HTNet_killAll (void)
|
} |
} |
return YES; |
return YES; |
} |
} |
|
|
|
/* ------------------------------------------------------------------------- */ |
|
/* Data Access Methods */ |
|
/* ------------------------------------------------------------------------- */ |
|
|
|
/* |
|
** Get and set the socket number |
|
*/ |
|
PUBLIC BOOL HTNet_setSocket (HTNet * net, SOCKET sockfd) |
|
{ |
|
if (net) { |
|
net->sockfd = sockfd; |
|
return YES; |
|
} |
|
return NO; |
|
} |
|
|
|
PUBLIC SOCKET HTNet_socket (HTNet * net) |
|
{ |
|
return (net ? net->sockfd : INVSOC); |
|
} |
|
|