In the KCP NetServer::netWorkerServer function, we start a network thread and exit if there are no incoming messages. That is, when the server starts, it will shut down. This is very strange, considering that the server must work constantly and wait for clients to connect
while (true) {
auto[received_bytes, status] = mKissnetSocket.recv(receiveBuffer,0, &receiveConnection);
if (!received_bytes || status != kissnet::socket_status::valid) {
KCP_LOGGER(false, LOGG_NOTIFY, "serverWorker quitting");
break;
}
In the KCP NetServer::netWorkerServer function, we start a network thread and exit if there are no incoming messages. That is, when the server starts, it will shut down. This is very strange, considering that the server must work constantly and wait for clients to connect