DatagramSink
from panda3d.core import DatagramSink
- class DatagramSink
Bases:
DTOOL_SUPER_BASE
This class defines the abstract interface to sending datagrams to any target, whether it be into a file or across the net
Inheritance diagram
- __init__(*args, **kwargs)
- copyDatagram()
C++ Interface: copy_datagram(const DatagramSink self, SubfileInfo result, const Filename filename) copy_datagram(const DatagramSink self, SubfileInfo result, const SubfileInfo source)
- /**
Copies the file data from the entire indicated file (via the vfs) as the
next datagram. This is intended to support potentially very large
datagrams.
Returns true on success, false on failure or if this method is
unimplemented. On true, fills “result” with the information that
references the copied file, if possible.
*/
- /**
Copies the file data from the range of the indicated file (outside of the
vfs) as the next datagram. This is intended to support potentially very
large datagrams.
Returns true on success, false on failure or if this method is
unimplemented. On true, fills “result” with the information that
references the copied file, if possible.
*/
- copy_datagram()
C++ Interface: copy_datagram(const DatagramSink self, SubfileInfo result, const Filename filename) copy_datagram(const DatagramSink self, SubfileInfo result, const SubfileInfo source)
- /**
Copies the file data from the entire indicated file (via the vfs) as the
next datagram. This is intended to support potentially very large
datagrams.
Returns true on success, false on failure or if this method is
unimplemented. On true, fills “result” with the information that
references the copied file, if possible.
*/
- /**
Copies the file data from the range of the indicated file (outside of the
vfs) as the next datagram. This is intended to support potentially very
large datagrams.
Returns true on success, false on failure or if this method is
unimplemented. On true, fills “result” with the information that
references the copied file, if possible.
*/
- file
- file_pos
- filename
- flush()
C++ Interface: flush(const DatagramSink self)
- getFile()
C++ Interface: get_file(const DatagramSink self)
- /**
Returns the FileReference that provides the target for these datagrams, if
any, or NULL if the datagrams do not written to a file on disk.
*/
- getFilePos()
C++ Interface: get_file_pos(const DatagramSink self)
- /**
Returns the current file position within the data stream, if any, or 0 if
the file position is not meaningful or cannot be determined.
For DatagramSinks that return a meaningful file position, this will be
pointing to the first byte following the datagram returned after a call to
put_datagram().
*/
- getFilename()
C++ Interface: get_filename(const DatagramSink self)
- /**
Returns the filename that provides the target for these datagrams, if any,
or empty string if the datagrams do not get written to a file on disk.
*/
- get_file()
C++ Interface: get_file(const DatagramSink self)
- /**
Returns the FileReference that provides the target for these datagrams, if
any, or NULL if the datagrams do not written to a file on disk.
*/
- get_file_pos()
C++ Interface: get_file_pos(const DatagramSink self)
- /**
Returns the current file position within the data stream, if any, or 0 if
the file position is not meaningful or cannot be determined.
For DatagramSinks that return a meaningful file position, this will be
pointing to the first byte following the datagram returned after a call to
put_datagram().
*/
- get_filename()
C++ Interface: get_filename(const DatagramSink self)
- /**
Returns the filename that provides the target for these datagrams, if any,
or empty string if the datagrams do not get written to a file on disk.
*/
- isError()
C++ Interface: is_error(const DatagramSink self)
- is_error()
C++ Interface: is_error(const DatagramSink self)
- putDatagram()
C++ Interface: put_datagram(const DatagramSink self, const Datagram data)
- put_datagram()
C++ Interface: put_datagram(const DatagramSink self, const Datagram data)