mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
* added function to extract Local Address from udpstack.
* update local address when a reset is called. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4417 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f6f721a492
commit
21145a29bb
@ -75,10 +75,17 @@ UdpLayer *UdpStack::getUdpLayer() /* for testing only */
|
||||
return udpLayer;
|
||||
}
|
||||
|
||||
bool UdpStack::getLocalAddress(struct sockaddr_in &local)
|
||||
{
|
||||
local = laddr;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool UdpStack::resetAddress(struct sockaddr_in &local)
|
||||
{
|
||||
std::cerr << "UdpStack::resetAddress(" << local << ")";
|
||||
std::cerr << std::endl;
|
||||
laddr = local;
|
||||
|
||||
return udpLayer->reset(local);
|
||||
}
|
||||
|
@ -78,6 +78,7 @@ virtual ~UdpStack() { return; }
|
||||
|
||||
UdpLayer *getUdpLayer(); /* for testing only */
|
||||
|
||||
bool getLocalAddress(struct sockaddr_in &local);
|
||||
bool resetAddress(struct sockaddr_in &local);
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user