Answer the question
In order to leave comments, you need to log in
How to properly implement a server for the game?
Hello, I am writing a server that will serve many client connections. The game does not take place in real time, the client needs to synchronize / send data every 10-15 seconds.
The server is written in libevent with multithreading. The base was taken here .
The main question - how to keep a lot of connections? Whether to answer correctly and close the connection so that other clients can continue to connect.
Tried to check the load: ab -c 1000 -r -t 10 http://127.0.0.1:5555/
And got
Complete requests: 50000
Failed requests: 101997
(Connect: 0, Receive: 50998, Length: 0, Exceptions: 50999)
Answer the question
In order to leave comments, you need to log in
Is it correct to answer and close the connection
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question