Edited connectionThread and connectionServer