panda3d.core.DatagramInputFile

from panda3d.core import DatagramInputFile
class DatagramInputFile

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__() → None
close() → None

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

getStream() → istream

Returns the istream represented by the input file.

Return type

istream

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.