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)
评论列表
文章目录