ledbat_test.py 文件源码

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

项目:pyledbat 作者: justas- 项目源码 文件源码
def _build_and_send_init_ack(self):
        """Build and send INI-ACK message"""

        # Build message bytes
        msg_bytes = bytearray(12)
        struct.pack_into('>III', msg_bytes, 0,
                         1,                     # Type
                         self.remote_channel,   # Remote channel
                         self.local_channel     # Local channel
                        )

        # Send it
        self._owner.send_data(msg_bytes, (self._remote_ip, self._remote_port))
        self._num_init_ack_sent += 1

        # Print log
        logging.info('%s Sent INIT-ACK message (%s)', self, self._num_init_ack_sent)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号