ultimatepp/uppsrc/ScgiServer/ScgiServer.h
jeremy_c 05fc41b3f5 *ScgiServer: Converted from using callbacks to using virtual methods for event handling.
git-svn-id: svn://ultimatepp.org/upp/trunk@2748 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2010-10-04 22:23:18 +00:00

34 lines
586 B
C++

#ifndef _ScgiServer_ScgiServer_h
#define _ScgiServer_ScgiServer_h
#include <Web/Web.h>
using namespace Upp;
class ScgiServer {
public:
HttpQuery query;
HttpQuery post;
ScgiServer(int port = 7800);
void Run();
dword ClientIP() { return clientIP; }
Socket ClientSock() { return clientSock; }
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