SocketStream

from panda3d.core import SocketStream
class SocketStream

Bases:

Bases: iostream, SSReader, SSWriter

A base class for iostreams that read and write to a (possibly non-blocking) socket.

Inheritance diagram

Inheritance diagram of SocketStream

close()
flush() bool

Sends the most recently queued data now. This only has meaning if setCollectTcp() has been set to true.

getTcpHeaderSize() int

Returns the header size for datagrams. See setTcpHeaderSize().

isClosed() bool
setTcpHeaderSize(tcp_header_size: int)

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.