DatagramOutputFile
from panda3d.core import DatagramOutputFile
- class DatagramOutputFile
Bases:
DatagramSink
This class can be used to write a binary file that consists of an arbitrary header followed by a number of datagrams.
Inheritance diagram
- __init__(*args, **kwargs)
- close()
C++ Interface: close(const DatagramOutputFile self)
- /**
Closes the file. This is also implicitly done when the DatagramOutputFile
destructs.
*/
- open()
C++ Interface: open(const DatagramOutputFile self, ostream out, const Filename filename) open(const DatagramOutputFile self, const FileReference file) open(const DatagramOutputFile self, const Filename filename)
- /**
Opens the indicated filename for writing. Returns true on success, false
on failure.
*/
- /**
Opens the indicated filename for writing. Returns true if successful,
false on failure.
*/
- /**
Starts writing to the indicated stream. Returns true on success, false on
failure. The DatagramOutputFile does not take ownership of the stream; you
are responsible for closing or deleting it when you are done.
*/
- stream
- writeHeader()
C++ Interface: write_header(const DatagramOutputFile self, bytes header) write_header(const DatagramOutputFile self, str header)
- /**
Writes a sequence of bytes to the beginning of the datagram file. This may
be called any number of times after the file has been opened and before the
first datagram is written. It may not be called once the first datagram is
written.
*/
- /**
Writes a sequence of bytes to the beginning of the datagram file. This may
be called any number of times after the file has been opened and before the
first datagram is written. It may not be called once the first datagram is
written.
*/
- write_header()
C++ Interface: write_header(const DatagramOutputFile self, bytes header) write_header(const DatagramOutputFile self, str header)
- /**
Writes a sequence of bytes to the beginning of the datagram file. This may
be called any number of times after the file has been opened and before the
first datagram is written. It may not be called once the first datagram is
written.
*/
- /**
Writes a sequence of bytes to the beginning of the datagram file. This may
be called any number of times after the file has been opened and before the
first datagram is written. It may not be called once the first datagram is
written.
*/