Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/OpenArkStudio/ARK
/ IsIPV4Address
Method
IsIPV4Address
src/base/AFSocketFunc.hpp:227–231 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
225
#endif
226
227
static bool IsIPV4Address(const string& ip)
228
{
229
struct sockaddr_in sa;
230
return inet_pton(AF_INET, ip.c_str(), &(sa.sin_addr)) != 0;
231
}
232
233
static bool IsIPV6Address(const string& ip)
234
{
Callers
nothing calls this directly
Calls
1
c_str
Method · 0.45
Tested by
no test coverage detected