Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione P@rtners 2.0 patch 349 git-svn-id: svn://10.65.10.50/trunk@10573 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			30 lines
		
	
	
		
			650 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			650 B
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
#include "BaseServ.h"
 | 
						|
 | 
						|
class MyServer : public TBaseServerApp
 | 
						|
{
 | 
						|
protected:  
 | 
						|
	virtual const wxChar* GetAppName() const;
 | 
						|
  virtual void ProcessCommand(wxString cmd, wxSocketOutputStream& outs);
 | 
						|
};
 | 
						|
 | 
						|
// Implementare almeno queste due funzioni pure virtuali
 | 
						|
 | 
						|
const wxChar* MyServer::GetAppName() const
 | 
						|
{
 | 
						|
	return "MyServer";
 | 
						|
}
 | 
						|
 | 
						|
void MyServer::ProcessCommand(wxString cmd, wxSocketOutputStream& outs)
 | 
						|
{
 | 
						|
	WriteLog("Processing...");
 | 
						|
	outs << "<HTML><BODY>\n"
 | 
						|
		   << "<H1>Hello world!</H1>\n"
 | 
						|
			 << "<BR><H2>Http command:</H2>\n"
 | 
						|
			 << "<P>" << cmd << "</P>\n"
 | 
						|
			 << "</BODY></HTML>\n";
 | 
						|
}
 | 
						|
 | 
						|
// Istanziare l'applicazione principale
 | 
						|
 | 
						|
IMPLEMENT_APP(MyServer)
 |