ez_packet module

Inheritance diagram of ez_packet

class ez_packet.Packet(data='', packet_number=1, max_packets=1, packets_hash='')[source]

Bases: object

The Packet type is used to make UDP sends reliable. See Packets for functionality.

verify_hash()[source]
class ez_packet.Packets(data=None, chunksize=100)[source]

Bases: object

A collection of Packet instances. To make a UDP transmission reliable create a Packets instance of the data to-be send. The data is chunked and for each Packet a hash is computed allowing the recipient to check whether the sent package is corrupted.

  • data = arbitrary data or even python objects.
chunks(step_size)[source]
reconstruct_data()[source]