コード例 #1
0
        public IHttpResponse Logout(IHttpSession session)
        {
            if (session.IsLoggedIn())
            {
                session.Clear();
            }


            return(new RedirectResponse("/"));
        }
コード例 #2
0
        void Close(bool only_free)//para keep-alive
        {
            if (_is_socket)
            {
                try { WriteSocketMsg("Kill", ESocketDataType.close); }
                catch { }
            }
            if (stream != null)
            {
                if (!only_free) { stream.Close(); stream.Dispose(); }
            }
            if (socket != null)
            {
                if (!only_free) { socket.Close(); }
                socket = null;
            }

            if (send_headers != null) send_headers.Clear();
            if (_req != null)
            {
                _req.Clear();
                if (!only_free) _req.Dispose();
            }
            httpCookie.Clear();
            if (ses != null) ses.Clear();

            lock (pushes)
            {
                if (pushes.Count > 0)
                {
                    if (_Server != null)
                        foreach (string s in pushes)
                            _Server.PushDel(this, s);

                    pushes.Clear();
                }
            }
        }
コード例 #3
0
        public IHttpResponse Logout(IHttpSession session)
        {
            session.Clear();

            return(new RedirectResponse("/login"));
        }
コード例 #4
0
ファイル: LoginController.cs プロジェクト: rmueller/fubumvc
        public FubuContinuation Logoff(LogoffRequestModel model)
        {
            _session.Clear();

            return(FubuContinuation.RedirectTo(new HomeInputModel()));
        }
コード例 #5
0
 public IHttpResponse Logout(IHttpSession session)
 {
     session.Clear();
     return(new RedirectResponse(UrlPaths.Home));
 }