14 #ifndef DATAGRAMBUFFER_H 15 #define DATAGRAMBUFFER_H 38 bool write_header(
const std::string &header);
39 virtual bool put_datagram(
const Datagram &data)
override;
40 virtual void flush()
override;
42 bool read_header(std::string &header,
size_t num_bytes);
43 virtual bool get_datagram(
Datagram &data)
override;
44 virtual bool is_eof()
override;
46 virtual bool is_error()
override;
48 INLINE
const vector_uchar &get_data()
const;
49 INLINE
void set_data(vector_uchar data);
50 INLINE
void swap_data(vector_uchar &other);
53 MAKE_PROPERTY(data, get_data, set_data);
58 bool _wrote_first_datagram;
59 bool _read_first_datagram;
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class defines the abstract interface to sending datagrams to any target, whether it be into a fi...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This class can be used to write a series of datagrams into a memory buffer.
This class defines the abstract interace to any source of datagrams, whether it be from a file or fro...
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...