DatagramBuffer¶
from acron.core import DatagramBuffer
- class DatagramBuffer¶
Bases:
Bases:
DatagramSink,DatagramGeneratorThis class can be used to write a series of datagrams into a memory buffer. It acts as both a datagram sink and generator; you can fill it up with datagrams and then read as many datagrams from it.
This uses the same format as
DatagramInputFileandDatagramOutputFile, meaning that Datagram sizes are always stored little-endian.Inheritance diagram
digraph inheritance528b7a0ec3 { 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=""]; "DatagramBuffer" [URL="acron.core.DatagramBuffer.html#acron.core.DatagramBuffer",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DatagramSink" -> "DatagramBuffer" [arrowsize=0.75,style=""]; "DatagramGenerator" -> "DatagramBuffer" [arrowsize=0.75,style=""]; "DatagramGenerator" [URL="acron.core.DatagramGenerator.html#acron.core.DatagramGenerator",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" -> "DatagramGenerator" [arrowsize=0.75,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=""]; }- __init__()¶
Initializes an empty datagram buffer.
Initializes the buffer with the given data.
- clear()¶
Clears the internal buffer.