1 #include <sys/socket.h>
2 #include <netinet/in.h>
8 static gboolean timeout(gpointer data) {
9 g_main_loop_quit(data);
13 int main(int argc, char *argv[]) {
17 GMainLoop *loop = NULL;
19 flx = flx_server_new(NULL);
21 flx_server_add_text(flx, 0, 0, AF_UNSPEC, FALSE, NULL, "hallo");
23 k = flx_key_new("cocaine.local.", FLX_DNS_CLASS_IN, FLX_DNS_TYPE_A);
24 flx_server_send_query(flx, 0, AF_UNSPEC, k);
27 loop = g_main_loop_new(NULL, FALSE);
29 g_timeout_add(5000, timeout, loop);
31 g_main_loop_run(loop);
32 g_main_loop_unref(loop);
34 flx_server_dump(flx, stdout);