class SocketStreamRecorder

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

explicit SocketStreamRecorder(SocketStream *stream, bool owns_stream)
void close(void)

See SocketStream::close().

bool consider_flush(void)

See SocketStream::consider_flush()

bool flush(void)

See SocketStream::flush()

static TypeHandle get_class_type(void)
bool get_collect_tcp(void) const

See SocketStream::get_collect_tcp().

double get_collect_tcp_interval(void) const

See SocketStream::get_collect_tcp_interval().

bool is_closed(void)

See SocketStream::is_closed().

bool receive_datagram(Datagram &dg)

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.

bool send_datagram(Datagram const &dg)

See SocketStream::send_datagram().

void set_collect_tcp(bool collect_tcp)

See SocketStream::set_collect_tcp().

void set_collect_tcp_interval(double interval)

See SocketStream::set_collect_tcp_interval().