mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-09 14:52:28 -04:00
Rewrite of the discovery system to be more private, with less traffic.
Split the visState into seperate vs_disc and vs_dht for easier handling. Split the heartbeat system into a separate service. Added IPv4 and IPv6 local/ext addresses into discovery & peer config. Fixed up samenet and samesubnet ipv4 calls. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6773 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
70c947ba90
commit
90aa57a0f0
38 changed files with 3248 additions and 1543 deletions
61
libretroshare/src/services/p3heartbeat.h
Normal file
61
libretroshare/src/services/p3heartbeat.h
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* libretroshare/src/services: p3heartbeat.h
|
||||
*
|
||||
* Services for RetroShare.
|
||||
*
|
||||
* Copyright 2004-2013 by Robert Fernie.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License Version 2.1 as published by the Free Software Foundation.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
||||
* USA.
|
||||
*
|
||||
* Please report all bugs and problems to "retroshare@lunamutt.com".
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef MRK_SERVICES_HEARTBEAT_H
|
||||
#define MRK_SERVICES_HEARTBEAT_H
|
||||
|
||||
// Moved Heartbeat to a seperate service.
|
||||
|
||||
#include "pqi/p3linkmgr.h"
|
||||
#include "pqi/pqipersongrp.h"
|
||||
#include "services/p3service.h"
|
||||
|
||||
|
||||
class p3heartbeat: public p3Service
|
||||
{
|
||||
public:
|
||||
|
||||
p3heartbeat(p3LinkMgr *linkMgr, pqipersongrp *pqipg);
|
||||
virtual ~p3heartbeat();
|
||||
|
||||
int tick();
|
||||
|
||||
private:
|
||||
|
||||
void sendHeartbeat(const std::string &toId);
|
||||
void recvHeartbeat(const std::string &fromId);
|
||||
|
||||
private:
|
||||
|
||||
p3LinkMgr *mLinkMgr;
|
||||
pqipersongrp *mPqiPersonGrp;
|
||||
|
||||
/* data */
|
||||
RsMutex mHeartMtx;
|
||||
|
||||
time_t mLastHeartbeat;
|
||||
};
|
||||
|
||||
#endif // MRK_SERVICES_HEARTBEAT_H
|
Loading…
Add table
Add a link
Reference in a new issue