mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 05:22:31 -04:00
Improvements to DHT, to support UDP connections.
* Changed getDhtPeerAddress() / Value() function to use const *bdNodeId. * Filled in getDhtPeerAddress()... to support UDP connections. * fixed bug in bdnode:: pong msg... wasn't checking if version existed. * printed out version string, as part of debug. * added IpAddr field to bdmanager peer search data. * stored IpAddr from queries... when peer found. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3604 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
26491f4b73
commit
20a49a59cf
6 changed files with 86 additions and 30 deletions
|
@ -103,14 +103,14 @@ void UdpBitDht::removeCallback(BitDhtCallback *cb)
|
|||
mBitDhtManager->removeCallback(cb);
|
||||
}
|
||||
|
||||
int UdpBitDht::getDhtPeerAddress(bdNodeId *id, struct sockaddr_in &from)
|
||||
int UdpBitDht::getDhtPeerAddress(const bdNodeId *id, struct sockaddr_in &from)
|
||||
{
|
||||
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
|
||||
|
||||
return mBitDhtManager->getDhtPeerAddress(id, from);
|
||||
}
|
||||
|
||||
int UdpBitDht::getDhtValue(bdNodeId *id, std::string key, std::string &value)
|
||||
int UdpBitDht::getDhtValue(const bdNodeId *id, std::string key, std::string &value)
|
||||
{
|
||||
bdStackMutex stack(dhtMtx); /********** MUTEX LOCKED *************/
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ virtual void addCallback(BitDhtCallback *cb);
|
|||
virtual void removeCallback(BitDhtCallback *cb);
|
||||
|
||||
/***** Get Results Details *****/
|
||||
virtual int getDhtPeerAddress(bdNodeId *id, struct sockaddr_in &from);
|
||||
virtual int getDhtValue(bdNodeId *id, std::string key, std::string &value);
|
||||
virtual int getDhtPeerAddress(const bdNodeId *id, struct sockaddr_in &from);
|
||||
virtual int getDhtValue(const bdNodeId *id, std::string key, std::string &value);
|
||||
|
||||
/******************* Internals *************************/
|
||||
/***** Iteration / Loop Management *****/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue