DatagramInputFile

from panda3d.core import DatagramInputFile
class DatagramInputFile

Bases:

Bases: DatagramGenerator

This class can be used to read a binary file that consists of an arbitrary header followed by a number of datagrams.

Inheritance diagram

Inheritance diagram of DatagramInputFile

__init__()
close()

Closes the file. This is also implicitly done when the DatagramInputFile destructs.

getStream() istream

Returns the istream represented by the input file.

open(file: FileReference) bool

Opens the indicated filename for reading. Returns true on success, false on failure.

open(filename: Filename) bool

Opens the indicated filename for reading. Returns true on success, false on failure.

open(in: istream, filename: Filename) bool

Starts reading from the indicated stream. Returns true on success, false on failure. The DatagramInputFile does not take ownership of the stream; you are responsible for closing or deleting it when you are done.