SSReader¶
-
class SSReader¶
An internal class for reading from a socket stream. This serves as a base class for both
ISocketStreamandSocketStream; its purpose is to minimize redundant code between them. Do not use it directly.Inheritance diagram
digraph inheritanceda1f9d60ef { 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=""]; }- SSReader.close()¶
- SSReader.get_tcp_header_size()¶
Returns the header size for datagrams. See
set_tcp_header_size().
- SSReader.is_closed()¶
- SSReader.receive_datagram()¶
Receives a datagram over the socket by expecting a little-endian 16-bit byte count as a prefix. If the socket stream is non-blocking, may return false if the data is not available; otherwise, returns false only if the socket closes.
- SSReader.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.