securedWebsocketCore.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:aws-iot-python 作者: vjammar 项目源码 文件源码
def _sendPONG(self):
        # Frames sent from client to server must be masked
        self._sslSocket.write(self._encodeFrame("", self._OP_PONG, masked=1))

    # Override sslSocket read. Always read from the wss internal payload buffer, which
    # contains the masked MQTT packet. This read will decode ONE wss frame every time
    # and load in the payload for MQTT _packet_read. At any time, MQTT _packet_read
    # should be able to read a complete MQTT packet from the payload (buffered per wss
    # frame payload). If the MQTT packet is break into separate wss frames, different
    # chunks will be buffered in separate frames and MQTT _packet_read will not be able
    # to collect a complete MQTT packet to operate on until the necessary payload is
    # fully buffered.
    # If the requested number of bytes are not available, SSL_ERROR_WANT_READ will be
    # raised to trigger another call of _packet_read when the data is available again.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号