TCP Socket Server that use only main thread