DatagramGeneratorNet¶
from acron.net import DatagramGeneratorNet
- class DatagramGeneratorNet¶
Bases:
Bases:
DatagramGenerator,ConnectionReader,QueuedReturn_DatagramThis class provides datagrams one-at-a-time as read directly from the net, via a TCP connection. If a datagram is not available,
get_datagram()will block until one is.Inheritance diagram
digraph inheritanceaa657277d0 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "ConnectionReader" [URL="acron.net.ConnectionReader.html#acron.net.ConnectionReader",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" -> "ConnectionReader" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,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=""]; "DatagramGeneratorNet" [URL="acron.net.DatagramGeneratorNet.html#acron.net.DatagramGeneratorNet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DatagramGenerator" -> "DatagramGeneratorNet" [arrowsize=0.75,style=""]; "ConnectionReader" -> "DatagramGeneratorNet" [arrowsize=0.75,style=""]; "QueuedReturn_Datagram" -> "DatagramGeneratorNet" [arrowsize=0.75,style=""]; "QueuedReturn_Datagram" [URL="acron.net.QueuedReturn_Datagram.html#acron.net.QueuedReturn_Datagram",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "DTOOL_SUPER_BASE" -> "QueuedReturn_Datagram" [arrowsize=0.75,style=""]; }- __init__()¶
Creates a new
DatagramGeneratorNetwith the indicated number of threads to handle requests. Normally num_threads should be either 0 or 1 to guarantee that datagrams are generated in the same order in which they were received.
- get_datagram()¶
Inherited from
DatagramGeneratorReads the next datagram from the stream. Blocks until a datagram is available. Returns true on success, false on stream closed or error.
- is_eof()¶
Returns true if the stream has been closed normally. This test may only be made after a call to
get_datagram()has failed.
- is_error()¶
Returns true if the stream has an error condition.