mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-09 12:22:34 +01:00
Accept incoming connections in a loop
This commit is contained in:
parent
fc0777717e
commit
dc9c4c3b72
@ -15,6 +15,7 @@ void HttpServer::run()
|
||||
|
||||
std::cout << "STARTING HTTP SERVER" << std::endl;
|
||||
|
||||
while (true) {
|
||||
sf::TcpSocket client;
|
||||
if (listener.accept(client) == sf::Socket::Done) {
|
||||
std::cout << "New connection from "
|
||||
@ -32,6 +33,7 @@ void HttpServer::run()
|
||||
|
||||
client.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
listener.close();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user