DatagramIterator
from panda3d.core import DatagramIterator
- class DatagramIterator
Bases:
A class to retrieve the individual data elements previously stored in a Datagram. Elements may be retrieved one at a time; it is up to the caller to know the correct type and order of each element.
Note that it is the responsibility of the caller to ensure that the datagram object is not destructed while this DatagramIterator is in use.
Inheritance diagram
- __init__()
- __init__(param0: DatagramIterator)
- extract_bytes(size: int) bytes
Extracts the indicated number of bytes in the datagram and returns them as a string.
- static get_class_type() TypeHandle
- get_current_index() int
Returns the current position within the datagram of the next piece of data to extract.
- get_fixed_string(size: int) str
Extracts a fixed-length string. However, if a zero byte occurs within the string, it marks the end of the string.
- get_int8() int8_t
Extracts a signed 8-bit integer.
- get_remaining_bytes() bytes
Returns the remaining bytes in the datagram as a string, but does not extract them from the iterator.
- get_stdfloat() float
Extracts either a 32-bit or a 64-bit floating-point number, according to
Datagram.set_stdfloat_double()
.
- get_uint8() uint8_t
Extracts an unsigned 8-bit integer.