35 : sock(true), pool(0), conn(0), poolsize(nthreads),
err(0),
36 server_shutdown(false), hreader(0)
78 WaitForSingleObject(
hreader, 1000);
84 WaitForSingleObject(
pool[i], 1000);
113 return (DWORD) E_POINTER;
125 for (
int i = 0; i <
poolsize; i++) {
149 if (!link)
return (DWORD) E_POINTER;
158 return net_server->
Reader(index);
160 return (DWORD) E_POINTER;
167 srand(timeGetTime());
175 const int MAX_REQUEST = 4096;
236 "HTTP/1.0 200 OK\nServer: Generic NetServer 1.0\nMIME-Version: 1.0\nContent-type: text/html\n\n";
238 response +=
"<html><head><title>Generic NetServer 1.0</title></head>\n\n";
239 response +=
"<body bgcolor=\"black\" text=\"white\">\n";
240 response +=
"<h1>Generic NetServer 1.0</h1>\n";
241 response +=
"<p>Didn't think I could do it, did ya?\n";
242 response +=
"</body></html>\n\n";
251 "HTTP/1.0 501 Not Implemented\nServer: Generic NetServer 1.0\nMIME-Version: 1.0\nContent-type: text/html\n\n";
253 response +=
"<html><head><title>Generic NetServer 1.0</title></head>\n\n";
254 response +=
"<body bgcolor=\"black\" text=\"white\">\n";
255 response +=
"<h1>Generic NetServer 1.0</h1>\n";
256 response +=
"<p>Sorry charlie... I'm not a magician.\n";
257 response +=
"</body></html>\n\n";