modified protocol for tcpserver