mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-17 18:40:49 -04:00
first part of peer sorting in friend server
This commit is contained in:
parent
62655779e5
commit
af6dee088c
4 changed files with 94 additions and 8 deletions
|
@ -32,8 +32,6 @@ FsBioInterface::FsBioInterface(int socket)
|
|||
|
||||
int FsBioInterface::tick()
|
||||
{
|
||||
std::cerr << "ticking FsNetworkInterface" << std::endl;
|
||||
|
||||
// 2 - read incoming data pending on existing connections
|
||||
|
||||
char inBuffer[1025];
|
||||
|
@ -57,7 +55,7 @@ int FsBioInterface::tick()
|
|||
return mTotalBufferBytes;
|
||||
}
|
||||
|
||||
std::cerr << "clintConnt: " << mCLintConnt << ", readbytes: " << readbytes << std::endl;
|
||||
RsDbg() << "clintConnt: " << mCLintConnt << ", readbytes: " << readbytes ;
|
||||
|
||||
// display some debug info
|
||||
|
||||
|
@ -77,7 +75,7 @@ int FsBioInterface::tick()
|
|||
mTotalBufferBytes += readbytes;
|
||||
mTotalReadBytes += readbytes;
|
||||
|
||||
std::cerr << "Socket: " << mCLintConnt << ". Total read: " << mTotalReadBytes << ". Buffer size: " << mTotalBufferBytes << std::endl ;
|
||||
RsDbg() << "Socket: " << mCLintConnt << ". Total read: " << mTotalReadBytes << ". Buffer size: " << mTotalBufferBytes ;
|
||||
}
|
||||
|
||||
return mTotalBufferBytes;
|
||||
|
|
|
@ -168,6 +168,15 @@ struct t_RsGenericIdType
|
|||
return ret;
|
||||
}
|
||||
|
||||
inline Id_t operator^ (const Id_t& fp) const
|
||||
{
|
||||
Id_t ret;
|
||||
for(uint32_t i=0; i < ID_SIZE_IN_BYTES; ++i)
|
||||
ret.bytes[i] = bytes[i] ^ fp.bytes[i];
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
inline bool isNull() const
|
||||
{
|
||||
for(uint32_t i=0; i < SIZE_IN_BYTES; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue