tools/hexnet: Move the TCP reading portion to a thread

This was too straight-forward to not just do it when I previously worked
on hexnet. Why didn't I just do it? Idk.
BodgeMaster-unfinished
BodgeMaster 2022-08-02 01:07:20 +02:00
parent 1308327fae
commit d0d02fc8d2
1 changed files with 2 additions and 1 deletions

View File

@ -160,7 +160,8 @@ int main(int argc, char* argv[]){
return EXIT_RUNTIME; return EXIT_RUNTIME;
} }
readFromTCPSocket(tcpSocket, mtu); std::thread threadReadTCP = std::thread(readFromTCPSocket, tcpSocket, mtu);
threadReadTCP.join();
delete tcpSocket; delete tcpSocket;
return EXIT_SUCCESS; return EXIT_SUCCESS;