Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ClientHandshake"/> class.
 /// </summary>
 /// <param name="aHeader">The header.</param>
 public ClientHandshake(Header aHeader)
 {
     ResourcePath = aHeader.RequestPath;
     Key = aHeader["sec-websocket-key"];
     SubProtocol = aHeader["sec-websocket-protocol"];
     Origin = aHeader["sec-websocket-origin"];
     Host = aHeader["host"];
     Cookies = aHeader.Cookies;
 }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UserContext"/> class.
        /// </summary>
        /// <param name="context">The user context.</param>
        public UserContext(Context context)
        {
            _context = context;

            Header = _context.Header;
        }