Moving tcp server into a .h/.cpp file.