(self, addr: str)
| 5098 | return sockets |
| 5099 | |
| 5100 | def parse_ip_port(self, addr: str) -> Tuple[str, int]: |
| 5101 | ip, port = addr.split(":") |
| 5102 | return socket.inet_ntoa(struct.pack("<I", int(ip, 16))), int(port, 16) |
| 5103 | |
| 5104 | def show_connections(self) -> None: |
| 5105 | # https://github.com/torvalds/linux/blob/v4.7/include/net/tcp_states.h#L16 |