mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
dhtrunner: return port in host byte order
This commit is contained in:
1 parent
7733d29326
commit
5b0fb9682b
1 file changed
+2
-2
@@ -226,11 +226,11 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the currently bound port.
|
||||
* Returns the currently bound port, in host byte order.
|
||||
* @param f: address family of the bound port to retreive.
|
||||
*/
|
||||
in_port_t getBoundPort(sa_family_t f = AF_INET) const {
|
||||
return ((sockaddr_in*)&getBound(f).first)->sin_port;
|
||||
return ntohs(((sockaddr_in*)&getBound(f).first)->sin_port);
|
||||
}
|
||||
|
||||
std::vector<NodeExport> exportNodes() const {
|
||||
|
||||
Reference in new issue
Block a user