Commit of the new UDP Connection methods and

the rewrite of the retroshare core networking stack.

This check-in commits the changes to the pqi code, 
and provides the majority of the improvements.

(1) Introduced new interfaces for DHT and UPnP abstraction: p3dhtmgr.h, p3upnpmgr.h
(2) Introduces abstraction for Authentication: p3authmgr.h
(3) New Connection Manager to coordinate networking code: p3connmgr.h
(4) New Configuration Manager: p3cfgmgr.h

This library has been significantly modified to support DHT synced connections
to enable connections between Firewalled Friends. The connection code has
been rewritten within a new framework, which should make extensions easier to code.

Also removed significant amount of old code relating to Tunnels, Channels etc.
This will be recycled later as higher level services that should not be
part of the core networking library.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@306 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-01-25 06:36:40 +00:00
parent de0ce110b9
commit 6435357c07
63 changed files with 8336 additions and 10839 deletions

View file

@ -279,18 +279,24 @@ virtual int notifyEvent(NetInterface *ni, int event) { return 0; }
std::string peerId;
};
/**** Consts for pqiperson -> placed here for NetBinDummy usage() */
const uint32_t PQI_CONNECT_TCP = 0x0001;
const uint32_t PQI_CONNECT_UDP = 0x0002;
/********************** Binary INTERFACE ****************************
* This defines the binary interface used by Network/loopback/file
* interfaces
*
* Flags are passed to BinInterfaces, and serialisers
*/
#define BIN_FLAGS_NO_CLOSE 0x0001
#define BIN_FLAGS_READABLE 0x0002
#define BIN_FLAGS_WRITEABLE 0x0004
#define BIN_FLAGS_NO_DELETE 0x0008
#define BIN_FLAGS_HASHDATA 0x0010
#define BIN_FLAGS_HASH_DATA 0x0010
class BinInterface
{
@ -306,6 +312,8 @@ virtual int netstatus() = 0;
virtual int isactive() = 0;
virtual bool moretoread() = 0;
virtual bool cansend() = 0;
virtual std::string gethash() = 0;
/* used by pqistreamer to limit transfers */
virtual bool bandwidthLimited() { return true; }
};
@ -340,7 +348,7 @@ virtual ~NetInterface()
// virtual int tick() = 0; // Already defined for BinInterface.
virtual int connectattempt() = 0;
virtual int connect(struct sockaddr_in raddr) = 0;
virtual int listen() = 0;
virtual int stoplistening() = 0;
virtual int disconnect() = 0;