document protocol
implement simple tcp server