From 0f79415953db7d494cc0be2c76a9c257a0779b29 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 20 Dec 2013 15:01:37 +0100 Subject: Re-add CONTEXT_PORT_NO_LISTEN to client context. Set timeout to 10ms for faster response time. --- src/muniacli.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/muniacli.cc b/src/muniacli.cc index 18a5d9a..9583957 100644 --- a/src/muniacli.cc +++ b/src/muniacli.cc @@ -113,7 +113,7 @@ int client(const char *address, int port) lws_set_log_level(0, NULL); struct lws_context_creation_info info; memset(&info, 0, sizeof info); - info.port = port; + info.port = CONTEXT_PORT_NO_LISTEN; info.iface = NULL; // What is this? info.protocols = protocols; info.extensions = libwebsocket_get_internal_extensions(); @@ -132,7 +132,7 @@ int client(const char *address, int port) */ int n = 1; while(n >= 0) { - n = libwebsocket_service(context, 1000); + n = libwebsocket_service(context, 10); if (wsi_task == NULL) { wsi_task = libwebsocket_client_connect(context, address, port, @@ -384,7 +384,7 @@ int client(const char *address, int port) int n = 1; while(n >= 0) { - n = libwebsocket_service(context, 1000); + n = libwebsocket_service(context, 10); if (wsi_task == NULL) { wsi_task = libwebsocket_client_connect(context, address, port, -- cgit v1.2.3