(sock: socket, packet: bytes)
| 271 | |
| 272 | @staticmethod |
| 273 | def send(sock: socket, packet: bytes): |
| 274 | global BYTES_SEND, REQUESTS_SENT |
| 275 | if not sock.send(packet): |
| 276 | return False |
| 277 | BYTES_SEND += len(packet) |
| 278 | REQUESTS_SENT += 1 |
| 279 | return True |
| 280 | |
| 281 | @staticmethod |
| 282 | def sendto(sock, packet, target): |