示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpResponse"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 public HttpResponse(HttpListenerContext context)
 {
     _response = context.Response;
     Cookies   = new CookieCollection(_response.Cookies);
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WebSocketContext"/> class.
 /// </summary>
 /// <param name="webSocketContext">The web socket context.</param>
 public WebSocketContext(System.Net.WebSockets.HttpListenerWebSocketContext webSocketContext)
 {
     _webSocketContext = webSocketContext;
     WebSocket         = new WebSocket(_webSocketContext.WebSocket);
     CookieCollection  = new CookieCollection(_webSocketContext.CookieCollection);
 }