summaryrefslogtreecommitdiff
path: root/common/async-resolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/async-resolver.h')
-rw-r--r--common/async-resolver.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/common/async-resolver.h b/common/async-resolver.h
new file mode 100644
index 0000000..6b31ff4
--- /dev/null
+++ b/common/async-resolver.h
@@ -0,0 +1,16 @@
+
+#ifndef __ASYNC_RESOLVER_H__
+#define __ASYNC_RESOLVER_H__
+
+#include <netdb.h>
+
+typedef void (*async_resolve_callback)(int ecode, struct addrinfo* ai, void* arg);
+
+int async_resolver_init();
+void async_resolver_uninit();
+
+void async_resolver_queue(const char* hostname, const char* servname,
+ async_resolve_callback cb, void* arg);
+
+
+#endif /* __ASYNC_RESOLVER_H__ */