Exemple #1
0
 public void Respond(Stream stream)
 {
     if (!this.waitingForResponse)
     {
         throw new InvalidOperationException("Cannot respond more than once.");
     }
     this.waitingForResponse = false;
     stream.Seek(0, SeekOrigin.Begin);
     byte[] bytes = stream.ReadAllBytesAndClose();
     byte[] body  = ProtocolEnabledHelper.BuildResponse(this.guid, bytes);
     this.request.Respond(body);
     this.tracerBroadcaster.OnResponded(bytes);
 }
Exemple #2
0
            private void Respond(string message)
            {
                string protocolMessage = ProtocolEnabledHelper.BuildResponse(this.guid, message);

                this.request.Respond(protocolMessage);
            }