DatagramSink¶
from acron.core import DatagramSink
- class DatagramSink¶
Bases:
This class defines the abstract interface to sending datagrams to any target, whether it be into a file or across the net
Inheritance diagram
digraph inheritance8669d722b0 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "DatagramSink" [URL="acron.core.DatagramSink.html#acron.core.DatagramSink",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "DatagramSink" [arrowsize=0.75,style=""]; }- copy_datagram()¶
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.
- property file FileReference¶
Returns the
FileReferencethat provides the target for these datagrams, if any, or NULL if the datagrams do not written to a file on disk.
- property file_pos 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.
For
DatagramSinksthat return a meaningful file position, this will be pointing to the first byte following the datagram returned after a call toput_datagram().
- property filename Filename¶
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.
- flush()¶
- get_file()¶
Returns the
FileReferencethat provides the target for these datagrams, if any, or NULL if the datagrams do not written to a file on disk.
- get_file_pos()¶
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
DatagramSinksthat return a meaningful file position, this will be pointing to the first byte following the datagram returned after a call toput_datagram().
- get_filename()¶
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.
- is_error()¶
- put_datagram()¶