georgetso
V2EX  ›  编程

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

  •  
  •   georgetso · Apr 29, 2016 · 6969 views
    This topic created in 3850 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
    lawfun
    Apr 29, 2016
    1
    我们是第一次握手时把信息发到服务器,没再用到 cookie
    mgcnrx11
    mgcnrx11
    Apr 29, 2016
    2
    你若需用用 session/cookie 做负载均衡,或者做认证(如单点登录),还是需要在建立 websocket 时用一下的,建立了之后就不用了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   934 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:37 · PVG 05:37 · LAX 13:37 · JFK 16:37
    ♥ Do have faith in what you're doing.