Пример #1
0
        internal unsafe ServerSession()
        {
            ulong serverSessionId = 0;
            var   statusCode      = HttpApi.HttpCreateServerSession(
                HttpApi.Version, &serverSessionId, 0);

            if (statusCode != UnsafeNclNativeMethods.ErrorCodes.ERROR_SUCCESS)
            {
                throw new HttpSysException((int)statusCode);
            }

            Debug.Assert(serverSessionId != 0, "Invalid id returned by HttpCreateServerSession");

            Id = new HttpServerSessionHandle(serverSessionId);
        }