aboutsummaryrefslogtreecommitdiff
path: root/src/util/sock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/sock.cpp')
-rw-r--r--src/util/sock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util/sock.cpp b/src/util/sock.cpp
index 1d44fbfdae..5eb0880318 100644
--- a/src/util/sock.cpp
+++ b/src/util/sock.cpp
@@ -102,6 +102,11 @@ int Sock::SetSockOpt(int level, int opt_name, const void* opt_val, socklen_t opt
return setsockopt(m_socket, level, opt_name, static_cast<const char*>(opt_val), opt_len);
}
+int Sock::GetSockName(sockaddr* name, socklen_t* name_len) const
+{
+ return getsockname(m_socket, name, name_len);
+}
+
bool Sock::Wait(std::chrono::milliseconds timeout, Event requested, Event* occurred) const
{
// We need a `shared_ptr` owning `this` for `WaitMany()`, but don't want