mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 14:45:12 -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
2 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue