ed2ktypes.h File Reference

Types related to ED2K module. More...

#include <hn/osdep.h>
#include <hn/hnfwd.h>
#include "ed2kfwd.h"

Go to the source code of this file.


Socket types

typedef SSocket< ED2K, Socket::Server,
Socket::TCP > 
ED2KServerSocket
typedef SSocket< ED2K, Socket::Client,
Socket::TCP > 
ED2KClientSocket
typedef UDPSocket ED2KUDPSocket

Defines

#define COL_SEND   COL_CYAN
#define COL_RECV   COL_GREEN
#define COL_COMP   COL_BYELLOW

Typedefs

typedef uint8_t IpType

Enumerations

enum  ED2K_Constants { ED2K_CHUNKSIZE = 180*1024 }
enum  SecIdentState { SI_SIGNEEDED = 0x01, SI_KEYANDSIGNEEDED = 0x02 }
 SecIdentState State values. More...
enum  IpTypeValues { IP_LOCAL = 10, IP_REMOTE = 20, IP_NONE = 30 }
 Types of IP sent in Signature packet; defined here since it's also used in CreditsDb::verifySignature() method. More...

Functions

bool isLowId (const uint32_t &id)
 Utility - checks whether an ID is low.
bool isHighId (const uint32_t &id)
 Utility - checks whether an ID is high.

Detailed Description

Types related to ED2K module.

Definition in file ed2ktypes.h.


Define Documentation

#define COL_SEND   COL_CYAN
 

Definition at line 67 of file ed2ktypes.h.

Referenced by ED2KPacket::Packet::makePacket(), and Client::sendNextChunk().

#define COL_RECV   COL_GREEN
 

Definition at line 68 of file ed2ktypes.h.

Referenced by Client::onPacket().

#define COL_COMP   COL_BYELLOW
 

Definition at line 69 of file ed2ktypes.h.

Referenced by ED2KPacket::Packet::makePacket(), Client::sendNextChunk(), and Client::setOnQueue().


Typedef Documentation

typedef SSocket<ED2K, Socket::Server, Socket::TCP> ED2KServerSocket
 

Definition at line 39 of file ed2ktypes.h.

typedef SSocket<ED2K, Socket::Client, Socket::TCP> ED2KClientSocket
 

Definition at line 40 of file ed2ktypes.h.

typedef UDPSocket ED2KUDPSocket
 

Definition at line 43 of file ed2ktypes.h.

typedef uint8_t IpType
 

Definition at line 60 of file ed2ktypes.h.


Enumeration Type Documentation

enum ED2K_Constants
 

Enumeration values:
ED2K_CHUNKSIZE  The size of a single chunk.

This indicates the maximum length of a chunk requested from another client. Smaller chunks may be requested if neccesery.

Definition at line 28 of file ed2ktypes.h.

enum SecIdentState
 

SecIdentState State values.

Enumeration values:
SI_SIGNEEDED  Signature is needed.
SI_KEYANDSIGNEEDED  Public key AND signature is needed.

Definition at line 47 of file ed2ktypes.h.

enum IpTypeValues
 

Types of IP sent in Signature packet; defined here since it's also used in CreditsDb::verifySignature() method.

Enumeration values:
IP_LOCAL  Sending party's IP address is included.
IP_REMOTE  Receiving party's IP address is included.
IP_NONE  No ip address is included in signature.

Definition at line 54 of file ed2ktypes.h.


Function Documentation

bool isLowId const uint32_t &  id  )  [inline]
 

Utility - checks whether an ID is low.

Definition at line 63 of file ed2ktypes.h.

Referenced by ED2KPacket::FoundSources::FoundSources(), and ED2K::isLowId().

bool isHighId const uint32_t &  id  )  [inline]
 

Utility - checks whether an ID is high.

Definition at line 65 of file ed2ktypes.h.

Referenced by ED2K::isHighId().