Linux c++ socket multithreading 2