Commit dfc73d8b by Thomas Brandého

close server if failed to listen

parent 37dcded7
......@@ -2,7 +2,7 @@
#define DEFINES_H
const unsigned short TCP_PORT = 42024;
const float REFRESH_TIME = 0.5;
const float REFRESH_TIME = 0.1;
enum TileType {
FLOOR,
......
......@@ -19,6 +19,8 @@ SocketHandler::SocketHandler(Server* s,unsigned short port):
if(m_listener.listen(port) == sf::TcpListener::Status::Done){
std::cout << "Server listening on port " << port << std::endl;
}
else
exit(0);
m_selector.add(m_listener);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment