Skip to content

Instantly share code, notes, and snippets.

@oza
Created December 12, 2009 09:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oza/254821 to your computer and use it in GitHub Desktop.
Save oza/254821 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <string>
extern "C"{
#include <sys/socket.h>
}
using namespace std;
class WebServer
{
public:
WebServer(string ip);
~WebServer(void);
void accept(void);
private:
string port;
int fd;
};
WebServer::WebServer(string port)
{
cout << "create:" << port << endl;
//bind();
//listen
}
WebServer::~WebServer(void)
{
//close();
}
void WebServer::run(void)
{
while(1){
;//accept();
}
}
int main()
{
WebServer* ws = new WebServer("3333");
ws->run();
delete(ws);
}
all:
g++ helloserver.cpp -o helloserver
clean:
server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment