Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
NetServer.h
Go to the documentation of this file.
1
/* Project nGenEx
2
Destroyer Studios LLC
3
Copyright © 1997-2004. All Rights Reserved.
4
5
SUBSYSTEM: NetEx.lib
6
FILE: NetServer.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
Network Server Pump for HTTP Server
13
*/
14
15
16
#ifndef NetServer_h
17
#define NetServer_h
18
19
#include <windows.h>
20
#include "
NetAddr.h
"
21
#include "
NetGram.h
"
22
#include "
NetSock.h
"
23
#include "
List.h
"
24
25
// +-------------------------------------------------------------------+
26
27
class
NetServer
28
{
29
public
:
30
static
const
char
*
TYPENAME
() {
return
"NetServer"
; }
31
32
NetServer
(WORD port,
int
poolsize
=1);
33
virtual
~NetServer
();
34
35
int
operator ==
(
const
NetServer
& l)
const
{
return
addr
== l.
addr
; }
36
37
virtual
void
Shutdown
();
38
virtual
DWORD
Listener
();
39
virtual
DWORD
Reader
(
int
index);
40
41
virtual
Text
ProcessRequest
(
Text
request,
const
NetAddr
&
addr
);
42
virtual
Text
DefaultResponse
();
43
virtual
Text
ErrorResponse
();
44
45
const
NetAddr
&
GetAddress
()
const
{
return
addr
; }
46
int
GetLastError
()
const
{
return
err
; }
47
48
protected
:
49
NetAddr
addr
;
50
NetSock
sock
;
51
NetAddr
client_addr
;
52
53
int
poolsize
;
54
HANDLE
hreader
;
55
HANDLE*
pool
;
56
NetSock
**
conn
;
57
NetAddr
*
clients
;
58
int
err
;
59
bool
server_shutdown
;
60
61
ThreadSync
sync
;
62
};
63
64
65
#endif NetServer_h
NetEx
NetServer.h
Generated on Tue Jun 5 2012 20:46:18 for Starshatter_Open by
1.8.1