implement connection-oriented client