SocketStreamRecorder

from panda3d.core import SocketStreamRecorder
class SocketStreamRecorder

Bases:

Bases: RecorderBase, ReferenceCount

Records any data received from the indicated socket stream. On playback, it will act as if the incoming data is coming over the wire again even if an actual connection is not available.

Outbound data will not be recorded, but will be sent straight through to the socket if it is connected, or silently ignored if it is not.

Inheritance diagram

Inheritance diagram of SocketStreamRecorder

__init__()
__init__(stream: SocketStream, owns_stream: bool)
close()

See SocketStream.close().

consider_flush() bool

See SocketStream.consider_flush()

flush() bool

See SocketStream.flush()

static get_class_type() TypeHandle
get_collect_tcp() bool

See SocketStream.get_collect_tcp().

get_collect_tcp_interval() float

See SocketStream.get_collect_tcp_interval().

is_closed() bool

See SocketStream.is_closed().

receive_datagram(dg: Datagram) bool

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.

send_datagram(dg: Datagram) bool

See SocketStream.send_datagram().

set_collect_tcp(collect_tcp: bool)

See SocketStream.set_collect_tcp().

set_collect_tcp_interval(interval: float)

See SocketStream.set_collect_tcp_interval().