public void SendResponse(Exchange exchange, Response response) { // Redirect the response to the HttpStack instead of a normal // CoAP endpoint. exchange.Request.Response = response; try { _server.ResponseProduced(exchange.Request, response); _server._httpStack.DoSendResponse(exchange.Request, response); } catch (Exception e) { if (log.IsWarnEnabled) { log.Warn("Exception while responding to Http request", e); } } }
public override void SendResponse(Response response) { // Redirect the response to the HttpStack instead of a normal // CoAP endpoint. // TODO: When we change endpoint to be an interface, we can // redirect the responses a little more elegantly. try { _request.Response = response; _server.ResponseProduced(_request, response); _server._httpStack.DoSendResponse(_request, response); } catch (Exception e) { if (log.IsWarnEnabled) { log.Warn("Exception while responding to Http request", e); } } }