SocketStream¶
from acron.core import SocketStream
- class SocketStream¶
Bases:
Bases:
iostream,SSReader,SSWriterA base class for iostreams that read and write to a (possibly non-blocking) socket.
Inheritance diagram
digraph inheritance4864af3e1a { 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=""]; "SSReader" [URL="acron.core.SSReader.html#acron.core.SSReader",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" -> "SSReader" [arrowsize=0.75,style=""]; "SSWriter" [URL="acron.core.SSWriter.html#acron.core.SSWriter",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" -> "SSWriter" [arrowsize=0.75,style=""]; "SocketStream" [URL="acron.core.SocketStream.html#acron.core.SocketStream",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "iostream" -> "SocketStream" [arrowsize=0.75,style=""]; "SSReader" -> "SocketStream" [arrowsize=0.75,style=""]; "SSWriter" -> "SocketStream" [arrowsize=0.75,style=""]; "basic_ios_char" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "ios_base" -> "basic_ios_char" [arrowsize=0.75,style=""]; "ios_base" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",tooltip="// We need to expose one method in each class to force it to publish."]; "DTOOL_SUPER_BASE" -> "ios_base" [arrowsize=0.75,style=""]; "iostream" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "istream" -> "iostream" [arrowsize=0.75,style=""]; "ostream" -> "iostream" [arrowsize=0.75,style=""]; "istream" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "basic_ios_char" -> "istream" [arrowsize=0.75,style=""]; "ostream" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "basic_ios_char" -> "ostream" [arrowsize=0.75,style=""]; }- close()¶
- flush()¶
Sends the most recently queued data now. This only has meaning if
set_collect_tcp()has been set to true.
- get_tcp_header_size()¶
Returns the header size for datagrams. See
set_tcp_header_size().
- is_closed()¶
- set_tcp_header_size()¶
Sets the header size for datagrams. At the present, legal values for this are 0, 2, or 4; this specifies the number of bytes to use encode the datagram length at the start of each TCP datagram. Sender and receiver must independently agree on this.