Additions to tcponudp to add a TouKeepAlive system.

This is only used if we are in 'firewalled' mode.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@360 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2008-02-28 10:43:33 +00:00
parent 31454138b7
commit 6dd3d30d8e
9 changed files with 335 additions and 25 deletions

View file

@ -66,12 +66,18 @@ extern "C" {
* (3) offer more stunpeers, for external address determination.
* int tou_stunpeer(const struct sockaddr *ext_addr, socklen_t addrlen, const char *id);
* (4) repeat (2)+(3) until a valid extaddr is returned.
* (5) if stunkeepalive is required, then periodically send out
* stun packets to maintain external firewall port.
*
*/
int tou_init(const struct sockaddr *my_addr, socklen_t addrlen);
int tou_extaddr(struct sockaddr *ext_addr, socklen_t *addrlen);
int tou_stunpeer(const struct sockaddr *ext_addr, socklen_t addrlen, const char *id);
int tou_stunkeepalive(int required);
int tou_tick_stunkeepalive();
/* Connections are as similar to UNIX as possible
* (1) create a socket: tou_socket() this reserves a socket id.