20 #ifndef BTPACKETREADER_H
21 #define BTPACKETREADER_H
26 #include <ktorrent_export.h>
27 #include <net/trafficshapedsocket.h>
35 QScopedArrayPointer<Uint8> data;
41 typedef QSharedPointer<IncomingPacket> Ptr;
61 bool ok()
const {
return !error;}
66 Uint32 newPacket(Uint8* buf, Uint32 size);
67 Uint32 readPacket(Uint8* buf, Uint32 size);
68 IncomingPacket::Ptr dequeuePacket();
72 #ifndef DO_NOT_USE_DEQUE
73 std::deque<IncomingPacket::Ptr> packet_queue;
75 QList<IncomingPacket::Ptr> packet_queue;
80 Uint32 max_packet_size;