21 #ifndef UTP_PACKETBUFFER_H_
22 #define UTP_PACKETBUFFER_H_
24 #include <QSharedPointer>
25 #include <ktorrent_export.h>
26 #include <util/constants.h>
27 #include <util/circularbuffer.h>
28 #include <util/bufferpool.h>
76 bt::Uint32
fillData(
const bt::Uint8* data, bt::Uint32 data_size);
90 const bt::Uint8*
data()
const {
return header;}
96 bt::Uint32
payloadSize()
const {
return payload ? (buffer->get() + MAX_SIZE) - payload: 0;}
99 bt::Uint32
headRoom()
const {
return payload ? payload - buffer->get() : MAX_SIZE;}
101 static const bt::Uint32 MAX_SIZE = 1500;
104 bt::Buffer::Ptr buffer;
106 bt::Uint8* extension;
110 static bt::BufferPool::Ptr pool;