示例#1
0
 protected override void PrepareHttpSendCore(HttpResponseMessage message)
 {
     result.SetStatusCode((int)message.StatusCode);
     if (message.ReasonPhrase != null)
     {
         result.SetStatusDescription(message.ReasonPhrase);
     }
     HostedHttpContext.AppendHeaderFromHttpResponseMessageToResponse(message, this.result);
 }
示例#2
0
        void BeforeAcceptWebSocket(HttpResponseMessage response)
        {
            this.SetRequestContainer(new HostedRequestContainer(this.result));
            string address = string.Empty;
            int    port    = 0;

            if (this.requestContainer.TryGetAddressAndPort(out address, out port))
            {
                this.remoteEndpointMessageProperty = new RemoteEndpointMessageProperty(address, port);
            }

            this.CloseHostedRequestContainer();

            HostedHttpContext.AppendHeaderFromHttpResponseMessageToResponse(response, this.result);
        }