| 1669 | |
| 1670 | |
| 1671 | class msg_sendcmpct: |
| 1672 | __slots__ = ("announce", "version") |
| 1673 | msgtype = b"sendcmpct" |
| 1674 | |
| 1675 | def __init__(self, announce=False, version=2): |
| 1676 | self.announce = announce |
| 1677 | self.version = version |
| 1678 | |
| 1679 | def deserialize(self, f): |
| 1680 | self.announce = bool(int.from_bytes(f.read(1), "little")) |
| 1681 | self.version = int.from_bytes(f.read(8), "little") |
| 1682 | |
| 1683 | def serialize(self): |
| 1684 | r = b"" |
| 1685 | r += int(self.announce).to_bytes(1, "little") |
| 1686 | r += self.version.to_bytes(8, "little") |
| 1687 | return r |
| 1688 | |
| 1689 | def __repr__(self): |
| 1690 | return "msg_sendcmpct(announce=%s, version=%lu)" % (self.announce, self.version) |
| 1691 | |
| 1692 | |
| 1693 | class msg_cmpctblock: |
no outgoing calls