add Run function to tcpserver