blob: ab7c420350f005e591ea5bf2a772ff6223cca6ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <stdio.h>
#include "chat.hpp"
const int port = 3030;
int main(int argc, char *argv[])
{
/* Event-driven programming */
/*
1) selection event
2) event handling
*/
EventSelector *selector = new EventSelector;
Server *serv = Server::Start(selector, port);
if(!serv) {
perror("server");
return 1;
}
selector->Run();
return 0;
}
|