ultimatepp/uppsrc/Web/ScgiServer.h
cxl 57a00962d8 Web: ScgiServer Run - listenCount parameter (thanks Mindtraveller!)
git-svn-id: svn://ultimatepp.org/upp/trunk@3310 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2011-03-25 17:29:43 +00:00

32 lines
660 B
C++

#ifndef _ScgiServer_ScgiServer_h
#define _ScgiServer_ScgiServer_h
class ScgiServer {
public:
HttpQuery query;
HttpQuery post;
ScgiServer(int port = 7800);
void Run(int listenCount = 10);
dword ClientIP() { return clientIP; }
Socket ClientSock() { return clientSock; }
void Write(const String& text) { clientSock.Write(text); }
bool HasPostData() { return hasPostData; }
virtual void OnAccepted() {}
virtual void OnRequest() {}
virtual void OnClosed() {}
protected:
int port;
Socket serverSock, clientSock;
VectorMap<String,String> serverVars;
dword clientIP;
bool hasPostData;
};
#endif