#include <packet.h>
|
|
typedef QSharedPointer< Packet > | Ptr |
| |
|
|
| Packet (const BitSet &bs) |
| |
|
| Packet (const Request &req, Uint8 type) |
| |
|
| Packet (Uint16 port) |
| |
|
| Packet (Uint32 chunk, Uint8 type) |
| |
|
| Packet (Uint32 index, Uint32 begin, Uint32 len, Chunk *ch) |
| |
|
| Packet (Uint8 ext_id, const QByteArray &ext_data) |
| |
|
| Packet (Uint8 type) |
| |
|
Uint8 * | getData () |
| |
|
const Uint8 * | getData () const |
| |
|
Uint32 | getDataLength () const |
| |
|
Uint8 | getType () const |
| | Get the packet type.
|
| |
|
bool | isOK () const |
| |
| bool | isPiece (const Request &req) const |
| |
|
Uint32 | isSent () const |
| | Is the packet sent ?
|
| |
| Packet * | makeRejectOfPiece () |
| |
| int | send (net::SocketDevice *sock, Uint32 max_to_send) |
| |
|
bool | sending () const |
| | Are we sending this packet ?
|
| |
- Author
- Joris Guisson
Packet off data, which gets sent to a Peer
Definition at line 43 of file packet.h.
◆ isPiece()
| bool bt::Packet::isPiece |
( |
const Request & |
req | ) |
const |
Is this a piece packet which matches a request
- Parameters
-
- Returns
- If this is a piece in response of this request
◆ makeRejectOfPiece()
| Packet* bt::Packet::makeRejectOfPiece |
( |
| ) |
|
If this packet is a piece, make a reject for it
- Returns
- The newly created Packet, 0 if this is not a piece
◆ send()
Send the packet over a SocketDevice
- Parameters
-
| sock | The socket |
| max_to_send | Max bytes to send |
- Returns
- int Return value of send call from SocketDevice
The documentation for this class was generated from the following file: