ultimatepp/uppsrc/Web/ScgiServer.h
cxl 6e83e45fd6 web: ScgiServer moved to Web
git-svn-id: svn://ultimatepp.org/upp/trunk@2757 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2010-10-08 16:10:26 +00:00

36 lines
689 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; }
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