From 8e12c8e42cc9ea9d12e55a3a0d8fbcb211504c04 Mon Sep 17 00:00:00 2001 From: Jordan Augé Date: Wed, 23 Oct 2019 17:55:00 +0200 Subject: [HICN-352] facemgr event loop enhancement; timer support & async hicn-light interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I920a0eb091d826e1eb0d1f786fb0b437487f7ff7 Signed-off-by: Jordan Augé --- ctrl/facemgr/examples/run-bonjour.sh | 16 ++++++++++++++++ ctrl/facemgr/examples/updownsrv/updownsrv.c | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'ctrl/facemgr/examples') diff --git a/ctrl/facemgr/examples/run-bonjour.sh b/ctrl/facemgr/examples/run-bonjour.sh index c6c317b42..cc1c28e27 100755 --- a/ctrl/facemgr/examples/run-bonjour.sh +++ b/ctrl/facemgr/examples/run-bonjour.sh @@ -1,5 +1,21 @@ #!/bin/bash +# Notes for MacOS: +# +# - Browse all discoverable services +# dns-sd -B _services._dns-sd._udp local. +# +# - Browse all hICN services +# dns-sd -B _hicn._udp local. +# +# - Lookup for specific options +# dns-sd -L "hicn node" _hicn._udp local. +# +# - Lookup addresses +# dns-sd -G v4v6 adreena.local. +# +# NOTE: trailing dot '.' is optional + set -e PORT=9695 diff --git a/ctrl/facemgr/examples/updownsrv/updownsrv.c b/ctrl/facemgr/examples/updownsrv/updownsrv.c index e10247860..5d624583b 100644 --- a/ctrl/facemgr/examples/updownsrv/updownsrv.c +++ b/ctrl/facemgr/examples/updownsrv/updownsrv.c @@ -112,6 +112,12 @@ int main() { fd = create_unix_server(UNIX_PATH); if (fd < 0) exit(EXIT_FAILURE); + + if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { + perror("fcntl"); + exit(EXIT_FAILURE); + } + FD_SET (fd, &active_fd_set); /* Create timer */ @@ -121,7 +127,7 @@ int main() { exit(EXIT_FAILURE); } - if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) { + if (fcntl(tfd, F_SETFL, O_NONBLOCK) < 0) { perror("fcntl"); exit(EXIT_FAILURE); } -- cgit 1.2.3-korg