mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-05 03:05:49 +00:00
27 lines
614 B
C++
27 lines
614 B
C++
#ifndef __CONNECTION_POOL__
|
|
#define __CONNECTION_POOL__
|
|
|
|
#include "Peer.h"
|
|
#include "PackedMessage.h"
|
|
#include "types.h"
|
|
#include <boost/asio.hpp>
|
|
class KnownNodeList;
|
|
|
|
/*
|
|
This is the list of all the Peers we are currently connected to
|
|
*/
|
|
class ConnectionPool
|
|
{
|
|
std::vector<Peer::pointer> mPeers;
|
|
//std::vector<std::pair<PackedMessage::pointer,int> > mBroadcastMessages;
|
|
|
|
public:
|
|
ConnectionPool();
|
|
void connectToNetwork(KnownNodeList& nodeList,boost::asio::io_service& io_service);
|
|
void relayMessage(Peer* fromPeer,PackedMessage::pointer msg);
|
|
//bool isMessageKnown(PackedMessage::pointer msg);
|
|
|
|
|
|
};
|
|
|
|
#endif |