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 flx_server_dump(flx, stdout);
20 k = flx_key_new("cocaine.local.", FLX_DNS_CLASS_IN, FLX_DNS_TYPE_A);
21 flx_server_send_query(flx, 0, AF_UNSPEC, k);
27 int main(int argc, char *argv[]) {
30 GMainLoop *loop = NULL;
32 flx = flx_server_new(NULL);
34 flx_server_add_text(flx, 0, 0, AF_UNSPEC, FALSE, NULL, "hallo");
36 loop = g_main_loop_new(NULL, FALSE);
38 /*g_timeout_add(1000*5, quit_timeout, loop);*/
39 g_timeout_add(1000, send_timeout, flx);
41 g_main_loop_run(loop);
43 g_main_loop_unref(loop);