# | Line 12 | Line 12 | void Daemon::serve(bool fork, Daemon* se | |
---|---|---|
12 | { | |
13 | api::TcpSocket server; | |
14 | ||
15 | – | server.Create(); |
15 | server.SetAddress(api::InternetAddress(api::InternetAddress::Any, port)); | |
16 | ||
17 | if (fork) | |
# | Line 35 | Line 34 | void Daemon::serve(bool fork, Daemon* se | |
34 | ||
35 | while (true) | |
36 | { | |
37 | < | Client* client (new Client); |
39 | < | |
40 | < | server.Accept(client->socket, &client->ip); |
41 | < | |
37 | > | Client* client (new Client(server)); |
38 | api::Thread thread(etl::BindAll(&Daemon::handle, self, client)); | |
39 | } | |
40 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |