evsocket::canIPv6 once

This commit is contained in:
Michael Davidsaver
2021-12-12 18:18:22 -08:00
parent 89fd1bba7a
commit 1be0477ee6
11 changed files with 26 additions and 12 deletions
+3 -1
View File
@@ -365,6 +365,8 @@ bool evbase::assertInRunningLoop() const
throw std::logic_error("Not in running evbase worker");
}
bool evsocket::canIPv6;
evsocket::evsocket(int af, evutil_socket_t sock)
:sock(sock)
,af(af)
@@ -636,7 +638,7 @@ std::vector<SockAddr> evsocket::broadcasts(const SockAddr* match) const
# define EAFNOSUPPORT WSAESOCKTNOSUPPORT
#endif
bool evsocket::canIPv6()
bool evsocket::init_canIPv6()
{
try {
evsocket sock(AF_INET6, SOCK_DGRAM, 0);