V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
georgetso
V2EX  ›  编程

websocket 通信模式中是否需要 session/cookie?

  •  
  •   georgetso · Apr 29, 2016 · 6720 views
    This topic created in 3658 days ago, the information mentioned may be changed or developed.
    在我理解中, http 通信是不连续的,所以需要 session/cookie 的手段提供上下文。
    那么在 websocket 这种连续的通信模型中,是否还需要 session/cookie 呢?‘
    谢谢
    2 replies    2016-04-29 17:46:24 +08:00
    lawfun
        1
    lawfun  
       Apr 29, 2016
    我们是第一次握手时把信息发到服务器,没再用到 cookie
    mgcnrx11
        2
    mgcnrx11  
       Apr 29, 2016
    你若需用用 session/cookie 做负载均衡,或者做认证(如单点登录),还是需要在建立 websocket 时用一下的,建立了之后就不用了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2905 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 09:15 · PVG 17:15 · LAX 02:15 · JFK 05:15
    ♥ Do have faith in what you're doing.