from panda3d.core import SocketStream
class SocketStream


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

flush() bool

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

get_tcp_header_size() int

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

is_closed() bool
set_tcp_header_size(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.