ledbat_test.py 文件源码

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

项目:pyledbat 作者: justas- 项目源码 文件源码
def _build_and_send_init(self):
        """Build and send the INIT message"""

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

        # Send it to the remote
        self._owner.send_data(msg_bytes, (self._remote_ip, self._remote_port))
        self._num_init_sent += 1

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


问题


面经


文章

微信
公众号

扫码关注公众号