zoukankan      html  css  js  c++  java
  • 结束握手

    结束握手

    https://tools.ietf.org/html/rfc6455#section-1.8

    1.4. Closing Handshake

    
    
       _This section is non-normative._
    
       The closing handshake is far simpler than the opening handshake.
    
       Either peer can send a control frame with data containing a specified
       control sequence to begin the closing handshake (detailed in
       Section 5.5.1).  Upon receiving such a frame, the other peer sends a
       Close frame in response, if it hasn't already sent one.  Upon
       receiving _that_ control frame, the first peer then closes the
       connection, safe in the knowledge that no further data is
       forthcoming.
    
       After sending a control frame indicating the connection should be
       closed, a peer does not send any further data; after receiving a
       control frame indicating the connection should be closed, a peer
       discards any further data received.
    
       It is safe for both peers to initiate this handshake simultaneously.
    
       The closing handshake is intended to complement the TCP closing
       handshake (FIN/ACK), on the basis that the TCP closing handshake is
       not always reliable end-to-end, especially in the presence of
       intercepting proxies and other intermediaries.
    
       By sending a Close frame and waiting for a Close frame in response,
       certain cases are avoided where data may be unnecessarily lost.  For
       instance, on some platforms, if a socket is closed with data in the
       receive queue, a RST packet is sent, which will then cause recv() to
       fail for the party that received the RST, even if there was data
       waiting to be read.
  • 相关阅读:
    Hibernate初级
    Servlet, Listener 、 Filter.
    DBCP数据源
    数据库连接池
    MySQL入门笔记
    20170330 webservice代理类测试
    20170330 ABAP代理生成
    20170329 隐士增强问题
    ABAP rfc 发布webservice 错误
    ABAP 性能优化001
  • 原文地址:https://www.cnblogs.com/rsapaper/p/12956269.html
Copyright © 2011-2022 走看看