33 #include "io/stream_peer.h" 34 #include "ring_buffer.h" 40 void _bnd_put_var(
const Variant& p_var);
42 static void _bind_methods();
47 Error _get_packet_error()
const;
50 mutable Error last_get_error;
54 virtual int get_available_packet_count()
const=0;
55 virtual Error
get_packet(
const uint8_t **r_buffer,
int &r_buffer_size)
const=0;
56 virtual Error put_packet(
const uint8_t *p_buffer,
int p_buffer_size)=0;
58 virtual int get_max_packet_size()
const=0;
65 virtual Error get_var(
Variant &r_variant)
const;
66 virtual Error put_var(
const Variant& p_packet);
82 Error _poll_buffer()
const;
85 void _set_stream_peer(
REF p_peer);
86 static void _bind_methods();
89 virtual int get_available_packet_count()
const;
90 virtual Error
get_packet(
const uint8_t **r_buffer,
int &r_buffer_size)
const;
91 virtual Error put_packet(
const uint8_t *p_buffer,
int p_buffer_size);
93 virtual int get_max_packet_size()
const;
96 void set_input_buffer_max_size(
int p_max_size);
102 #endif // PACKET_STREAM_H
virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) const =0
buffer is GONE after next get_packet
Definition: reference.h:40
Definition: packet_peer.h:72
Definition: packet_peer.h:35