Panda3D
|
A base class for ostreams that write to a (possibly non-blocking) socket. More...
#include <pandadoc.hpp>
Public Member Functions | |
close () | |
bool | flush () |
Sends the most recently queued data now. | |
bool | isClosed () |
![]() | |
flush () | |
put (char c) | |
seekp (Streamoff off, IosBase::Seekdir dir) | |
seekp (Streamoff pos) | |
Streamoff | tellp () |
![]() | |
bool | bad () |
clear () | |
bool | eof () |
bool | fail () |
bool | good () |
![]() | |
close () | |
bool | considerFlush () |
Sends the most recently queued data if enough time has elapsed. | |
bool | flush () |
Sends the most recently queued data now. | |
bool | getCollectTcp () |
Returns the current setting of "collect-tcp" mode. | |
double | getCollectTcpInterval () |
Returns the interval in time, in seconds, for which to hold TCP packets before sending all of the recently received packets at once. | |
int | getTcpHeaderSize () |
Returns the header size for datagrams. | |
bool | isClosed () |
bool | sendDatagram (const Datagram dg) |
Transmits the indicated datagram over the socket by prepending it with a little-endian 16-bit byte count. | |
setCollectTcp (bool collect_tcp) | |
Enables or disables "collect-tcp" mode. | |
setCollectTcpInterval (double interval) | |
Specifies the interval in time, in seconds, for which to hold TCP packets before sending all of the recently received packets at once. | |
setTcpHeaderSize (int tcp_header_size) | |
Sets the header size for datagrams. | |
Additional Inherited Members | |
![]() | |
enum | Iostate |
enum | Openmode |
enum | Seekdir { beg = 0 , cur = 1 , end = 2 } |
A base class for ostreams that write to a (possibly non-blocking) socket.
It adds is_closed(), which can be called after any write operation fails to check whether the socket has been closed, or whether more data may be sent later.
close | ( | ) |
bool flush | ( | ) |
Sends the most recently queued data now.
This only has meaning if set_collect_tcp() has been set to true.
bool isClosed | ( | ) |