panda3d.core.DatagramBuffer¶

class DatagramBuffer

This class can be used to write a series of datagrams into a memory buffer. It acts as both a datagram sink and generator; you can fill it up with datagrams and then read as many datagrams from it.

This uses the same format as DatagramInputFile and DatagramOutputFile, meaning that Datagram sizes are always stored little-endian.

Inheritance diagram

__init__() → None

Initializes an empty datagram buffer.

__init__(data: bytes) → None

Initializes the buffer with the given data.

clear() → None

Clears the internal buffer.

property data
Getter

Returns the internal buffer.

Setter

Replaces the data in the internal buffer.

Return type

bytes