Furrent
Classes | Enumerations | Functions
fur::download::message Namespace Reference

Classes

class  BitfieldMessage
 
class  ChokeMessage
 
class  HaveMessage
 
class  InterestedMessage
 
class  KeepAliveMessage
 
class  Message
 
class  NotInterestedMessage
 
class  PieceMessage
 
class  RequestMessage
 
class  UnchokeMessage
 

Enumerations

enum  MessageKind {
  MessageKind::KeepAlive, MessageKind::Choke, MessageKind::Unchoke, MessageKind::Interested,
  MessageKind::NotInterested, MessageKind::Have, MessageKind::Bitfield, MessageKind::Request,
  MessageKind::Piece
}
 
enum  DecodeError { DecodeError::UnexpectedPayload, DecodeError::InvalidHeader, DecodeError::UnknownMessageID, DecodeError::InvalidPayloadLength }
 

Functions

std::string display_decode_error (const DecodeError &err)
 

Enumeration Type Documentation

◆ DecodeError

Enumerator
UnexpectedPayload 

Message has payload but didn't expect any.

InvalidHeader 

Message has an invalid header. Meaning it's not a KeepAliveMessage and it's missing the length field or message id

UnknownMessageID 

Not a known message type.

InvalidPayloadLength 

Payload has invalid length, according the message's total length and message ID

◆ MessageKind

Enumerator
KeepAlive 
Choke 
Unchoke 
Interested 
NotInterested 
Have 
Bitfield 
Request 
Piece 

Function Documentation

◆ display_decode_error()

std::string fur::download::message::display_decode_error ( const DecodeError err)