|
libktorrent
2.1.1
|
#include <packetreader.h>

Public Member Functions | |
| PacketReader (Uint32 max_packet_size) | |
| bool | ok () const |
| Did an error occur. | |
| void | onDataReady (Uint8 *buf, Uint32 size) override |
| void | update (PeerInterface &peer) |
Chops up the raw byte stream from a socket into bittorrent packets
Definition at line 66 of file packetreader.h.
|
overridevirtual |
Function which will be called whenever data has been read from the socket. This data should be dealt with, otherwise it will be discarded.
| buf | The buffer |
| size | The size of the buffer |
Implements net::SocketReader.
| void bt::PacketReader::update | ( | PeerInterface & | peer | ) |
Push packets to Peer (runs in main thread)
| peer | The PeerInterface which will handle the packet |
1.8.18