MG_DISABLE_(DNS|(_SYNC)?_RESOLVER) -> MG_ENABLE_$1

Disable sync resolver by default.

PUBLISHED_FROM=dbaed194e5fe211c07564fe6880649a1aee7f662
This commit is contained in:
Deomid Ryabkov authored and Cesanta Bot committed 2016-10-17 19:21:46 +00:00
1 parent 4ef3a778c1
commit 492dcdca8d
4 files changed
+41 -31

No files matched your search

+1
View File
@@ -19,6 +19,7 @@ items:
- { name: mg_printf.md }
- { name: mg_vprintf.md }
- { name: mg_socketpair.md }
- { name: mg_resolve.md }
- { name: mg_check_ip_acl.md }
- { name: mg_enable_multithreading.md }
- { name: mg_enable_javascript.md }
+17
View File
@@ -0,0 +1,17 @@
---
title: "mg_resolve()"
decl_name: "mg_resolve"
symbol_kind: "func"
signature: |
int mg_resolve(const char *domain_name, char *ip_addr_buf, size_t buf_len);
---
Convert domain name into IP address.
This is a utility function. If compilation flags have
`-DMG_ENABLE_GETADDRINFO`, then `getaddrinfo()` call is used for name
resolution. Otherwise, `gethostbyname()` is used.
CAUTION: this function can block.
Return 1 on success, 0 on failure.