25 INLINE
bool SSReader::
27 #ifdef SIMULATE_NETWORK_DELAY
29 while (do_receive_datagram(dg)) {
32 return get_delayed(dg);
37 if (get_delayed(dg)) {
40 #endif // SIMULATE_NETWORK_DELAY
42 return do_receive_datagram(dg);
54 INLINE
void SSReader::
55 set_tcp_header_size(
int tcp_header_size) {
56 nassertv(tcp_header_size == 0 || tcp_header_size == 2 || tcp_header_size == 4);
57 _tcp_header_size = tcp_header_size;
67 get_tcp_header_size()
const {
68 return _tcp_header_size;
92 INLINE
void SSWriter::
93 set_collect_tcp(
bool collect_tcp) {
94 _collect_tcp = collect_tcp;
103 INLINE
bool SSWriter::
104 get_collect_tcp()
const {
117 INLINE
void SSWriter::
118 set_collect_tcp_interval(
double interval) {
119 _collect_tcp_interval = interval;
131 INLINE
double SSWriter::
132 get_collect_tcp_interval()
const {
133 return _collect_tcp_interval;
145 INLINE
void SSWriter::
146 set_tcp_header_size(
int tcp_header_size) {
147 nassertv(tcp_header_size == 0 || tcp_header_size == 2 || tcp_header_size == 4);
148 _tcp_header_size = tcp_header_size;
157 INLINE
int SSWriter::
158 get_tcp_header_size()
const {
159 return _tcp_header_size;
169 INLINE
bool SSWriter::
179 if (elapsed < 0.0 || elapsed >= _collect_tcp_interval) {
194 INLINE
bool SSWriter::
206 INLINE ISocketStream::
207 ISocketStream(streambuf *buf) : istream(buf), SSReader(this) {
216 INLINE OSocketStream::
217 OSocketStream(streambuf *buf) : ostream(buf), SSWriter(this) {
227 INLINE
bool OSocketStream::
229 return SSWriter::flush();
237 INLINE SocketStream::
238 SocketStream(streambuf *buf) : iostream(buf), SSReader(this), SSWriter(this) {
250 INLINE
void SocketStream::
251 set_tcp_header_size(
int tcp_header_size) {
252 SSReader::set_tcp_header_size(tcp_header_size);
253 SSWriter::set_tcp_header_size(tcp_header_size);
262 INLINE
int SocketStream::
263 get_tcp_header_size()
const {
264 return SSReader::get_tcp_header_size();
274 INLINE
bool SocketStream::
276 return SSWriter::flush();
static TrueClock * get_global_ptr()
Returns a pointer to the one TrueClock object in the world.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...