1 #include <sys/socket.h>
2 #include <netinet/in.h>
8 static gboolean quit_timeout(gpointer data) {
9 g_main_loop_quit(data);
13 static gboolean send_timeout(gpointer data) {
14 flxServer *flx = data;
17 k = flx_key_new("cocaine.local.", FLX_DNS_CLASS_IN, FLX_DNS_TYPE_A);
18 flx_server_send_query(flx, 0, AF_UNSPEC, k);
24 int main(int argc, char *argv[]) {
27 GMainLoop *loop = NULL;
29 flx = flx_server_new(NULL);
31 flx_server_add_text(flx, 0, 0, AF_UNSPEC, FALSE, NULL, "hallo");
33 loop = g_main_loop_new(NULL, FALSE);
35 g_timeout_add(1000*5, quit_timeout, loop);
36 g_timeout_add(1000, send_timeout, flx);
38 g_main_loop_run(loop);
40 g_main_loop_unref(loop);
42 flx_server_dump(flx, stdout);