DatagramSinkNet¶
-
class DatagramSinkNet¶
Bases:
DatagramSink,ConnectionWriterThis class accepts datagrams one-at-a-time and sends them over the net, via a TCP connection.
Inheritance diagram
digraph inheritance3162c1715d { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "ConnectionWriter" [URL="acron.net.ConnectionWriter.html#acron.net.ConnectionWriter",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" -> "ConnectionWriter" [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=""]; "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=""]; "DatagramSinkNet" [URL="acron.net.DatagramSinkNet.html#acron.net.DatagramSinkNet",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DatagramSink" -> "DatagramSinkNet" [arrowsize=0.75,style=""]; "ConnectionWriter" -> "DatagramSinkNet" [arrowsize=0.75,style=""]; }- DatagramSinkNet.__init__()¶
Creates a new
DatagramSinkNetwith the indicated number of threads to handle writing. Normally num_threads should be either 0 or 1 to guarantee that datagrams are delivered in the same order in which they were sent.
- DatagramSinkNet.flush()¶
Ensures that all datagrams previously written will be visible on the stream.
- DatagramSinkNet.get_target()¶
Returns the current target Connection, or NULL if the target has not yet been set. See
set_target().
- DatagramSinkNet.is_error()¶
Returns true if there is an error on the target connection, or if the target has never been set.
- DatagramSinkNet.put_datagram()¶
Inherited from
DatagramSinkSends the given datagram to the target. Returns true on success, false if there is an error. Blocks if necessary until the target is ready.
- DatagramSinkNet.set_target()¶
Specifies the Connection that will receive all future Datagrams sent.