public string WriteResponse(IProtocolObject protocolObject)
        {
            var message = EncapsulateString(protocolObject.Response());

            WriterTarget.Write(message);
            return(message);
        }
        public async Task <string> WriteResponseAsync(IProtocolObject protocolObject)
        {
            var response = protocolObject.Response();

            Trace.WriteLine($"Sending response: {response}\n");

            var message = EncapsulateString(response);
            await WriterTarget.WriteAsync(message).ConfigureAwait(false);

            return(message);
        }