updates to libbitdht to make it work with retroshare.

* decreased nodes per bucket to 10 - to try reduce traffic.
 * changed operator< to non const.
 * fixed up debuging.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3322 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2010-07-31 18:01:24 +00:00
parent 1069ed0c58
commit c1b624832f
6 changed files with 24 additions and 9 deletions

View file

@ -37,6 +37,8 @@
* #define DEBUG_UDP_LAYER 1
***/
//#define DEBUG_UDP_LAYER 1
static const int UDP_DEF_TTL = 64;
/* NB: This #define makes the listener open 0.0.0.0:X port instead
@ -77,7 +79,8 @@ class udpPacket
int len;
};
std::ostream &operator<<(std::ostream &out, const struct sockaddr_in &addr)
//std::ostream &operator<<(std::ostream &out, const struct sockaddr_in &addr)
std::ostream &operator<<(std::ostream &out, struct sockaddr_in &addr)
{
out << "[" << inet_ntoa(addr.sin_addr) << ":";
out << htons(addr.sin_port) << "]";