from panda3d.core import DatagramGenerator
- class DatagramGenerator
This class defines the abstract interace to any source of datagrams, whether it be from a file or from the net.
- getFile() FileReference
FileReferencethat provides the source for these datagrams, if any, or NULL if the datagrams do not originate from a file on disk.
- getFilePos() int
Returns the current file position within the data stream, if any, or 0 if the file position is not meaningful or cannot be determined.
- getFilename() Filename
Returns the filename that provides the source for these datagrams, if any, or empty string if the datagrams do not originate from a file on disk.
- getTimestamp() int
Returns the on-disk timestamp of the file that was read, at the time it was opened, if that is available, or 0 if it is not.
- getVfile() VirtualFile
- saveDatagram(info: SubfileInfo) bool
Skips over the next datagram without extracting it, but saves the relevant file information in the
SubfileInfoobject so that its data may be read later. For non-file-based datagram generators, this may mean creating a temporary file and copying the contents of the datagram to disk.
Returns true on success, false on failure or if this method is unimplemented.