1) modify tcpserver to support long-lived connection