# PeerInfo Class Reference

This Class is used to store a peer attributes and status. More...

`#include <PeerInfo.h>`

List of all members.

## Public Member Functions

void | set_peer_port (int port)
| Used to set the peer communication port.
void | set_peer_id (string id)
| Used to set the peer id.
void | set_peer_ip_adr (string ip_adr)
| Used to set the peer ip @.
void | set_number_of_wanted_peers (int nw)
| Used to set the number of wanted peers.
void | add_torrent_of_interest (string info_hash, int uploaded, int downloaded, int left, std::string ev)
| Method used to add a torrent of interest.
int | get_number_of_wanted_peers ()
| Function used to get the number of wanted peers.
int | get_peer_port ()
| Function used to get the peer communication port.
string | get_peer_id ()
| Function used to get the peer id.
string | get_peer_ip_adr ()
| Function used to get the peer ip address.
bool | am_i_seeder (std::string info_hash)
| Function used to check if the peer is a seeder or not.
string | get_bencoded_info (string torrent_id)
| Function used to get the peer status as a bencoded message.
string | get_limited_bencoded_info (string torrent_id)
| Function used to get the restricted peer status as a bencoded message.
void | SetNumberOfHops (int i)
| Function used to set the number of hops.
int | GetNumberOfHops ()
| Function used to get the number of hops.
void | UpdateLastUpdateDate ()
| Function used to update the last update date.
void | SetTrackerClientPollInterval (int i)
| Function used to the tracker client poll interval.

## Private Attributes

string | peer_id
| The peer Id.
int | peer_port
| The peer port.
string | peer_ip_adr
| The peer Ip @.
int | numwant
| Number of peers that the client would like to recive from the tracker,this value is permitted to be zero, if ommited typically defaults to 50 peers.
int | number_of_hops
| Number of hops to the peer.
map< string, torrent_state * > | torrents_of_interest
| Map used to store the list of torrents of interest to the peer.
WORD | uLastModified
| Last time the peer status was updated.

## Detailed Description

This Class is used to store a peer attributes and status.

The documentation for this class was generated from the following files:

- Mes documents/Visual Studio 2005/Projects/WM-ADHOC-TRACKER/WM-ADHOC-TRACKER/PeerInfo.h
- Mes documents/Visual Studio 2005/Projects/WM-ADHOC-TRACKER/WM-ADHOC-TRACKER/PeerInfo.cpp