diff options
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | contrib/libosmo-netif.spec.in | 84 | ||||
-rw-r--r-- | examples/ipa-stream-client.c | 8 | ||||
-rw-r--r-- | examples/ipa-stream-server.c | 9 | ||||
-rw-r--r-- | examples/stream-client.c | 9 | ||||
-rw-r--r-- | examples/stream-server.c | 13 | ||||
-rw-r--r-- | include/osmocom/netif/stream.h | 18 | ||||
-rw-r--r-- | src/stream_cli.c | 34 | ||||
-rw-r--r-- | src/stream_srv.c | 80 | ||||
-rw-r--r-- | tests/stream/stream_test.c | 45 | ||||
-rw-r--r-- | tests/stream/stream_test.err | 62 |
13 files changed, 223 insertions, 145 deletions
diff --git a/Makefile.am b/Makefile.am index f50cd0f..fd03b74 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,7 +9,6 @@ pkgconfig_DATA = libosmo-netif.pc EXTRA_DIST = \ .version \ README.md \ - contrib/libosmo-netif.spec.in \ debian \ git-version-gen \ $(NULL) @@ -45,7 +45,7 @@ Contributing Our coding standards are described at <https://osmocom.org/projects/cellular-infrastructure/wiki/Coding_standards> -We us a gerrit based patch submission/review process for managing +We use a Gerrit based patch submission/review process for managing contributions. Please see <https://osmocom.org/projects/cellular-infrastructure/wiki/Gerrit> for more details diff --git a/configure.ac b/configure.ac index 6b4c2be..8016bdd 100644 --- a/configure.ac +++ b/configure.ac @@ -148,5 +148,4 @@ AC_OUTPUT( utils/Makefile tests/Makefile Doxyfile - Makefile - contrib/libosmo-netif.spec) + Makefile) diff --git a/contrib/libosmo-netif.spec.in b/contrib/libosmo-netif.spec.in deleted file mode 100644 index 4ac1302..0000000 --- a/contrib/libosmo-netif.spec.in +++ /dev/null @@ -1,84 +0,0 @@ -# -# spec file for package libosmo-netif -# -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -Name: libosmo-netif -Version: @VERSION@ -Release: 0 -Summary: Osmocom library for muxed audio -License: GPL-2.0-or-later -Group: Productivity/Telephony/Utilities -URL: https://osmocom.org/projects/libosmo-netif -Source: %{name}-%{version}.tar.xz -BuildRequires: automake -BuildRequires: libtool >= 2 -BuildRequires: lksctp-tools-devel -BuildRequires: pkgconfig >= 0.20 -BuildRequires: pkgconfig(libosmocore) >= 1.9.0 -BuildRequires: pkgconfig(libosmogsm) >= 1.9.0 -BuildRequires: pkgconfig(libosmocodec) >= 1.9.0 - -%description -Network interface demuxer library for OsmoCom projects. - -%package -n libosmonetif11 -Summary: Osmocom library for muxed audio -License: AGPL-3.0-or-later -Group: System/Libraries - -%description -n libosmonetif11 -Network interface demuxer library for OsmoCom projects. - -%package -n libosmonetif-devel -Summary: Development files for the Osmocom muxed audio library -License: AGPL-3.0-or-later -Group: Development/Libraries/C and C++ -Requires: libosmonetif11 = %{version} - -%description -n libosmonetif-devel -Network interface demuxer library for OsmoCom projects. - -This subpackage contains libraries and header files for developing -applications that want to make use of libosmo-netif. - -%prep -%setup -q - -%build -echo "%{version}" >.tarball-version -autoreconf -fiv -%configure --enable-shared --disable-static --includedir="%{_includedir}/%{name}" -make %{?_smp_mflags} - -%install -%make_install -find %{buildroot} -type f -name "*.la" -delete -print - -%check -make %{?_smp_mflags} check || (find . -name testsuite.log -exec cat {} +) - -%post -n libosmonetif11 -p /sbin/ldconfig -%postun -n libosmonetif11 -p /sbin/ldconfig - -%files -n libosmonetif11 -%{_libdir}/libosmonetif.so.11* - -%files -n libosmonetif-devel -%license COPYING -%dir %{_includedir}/%{name} -%dir %{_includedir}/%{name}/osmocom -%{_includedir}/%{name}/osmocom/netif/ -%{_libdir}/libosmonetif.so -%{_libdir}/pkgconfig/libosmo-netif.pc - -%changelog diff --git a/examples/ipa-stream-client.c b/examples/ipa-stream-client.c index 720fe66..b58370e 100644 --- a/examples/ipa-stream-client.c +++ b/examples/ipa-stream-client.c @@ -102,13 +102,19 @@ static int connect_cb(struct osmo_stream_cli *conn) return 0; } -static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg) +static int read_cb(struct osmo_stream_cli *conn, int res, struct msgb *msg) { int num; struct msg_sent *cur, *tmp, *found = NULL; LOGP(DIPATEST, LOGL_DEBUG, "received message from stream (payload len=%d)\n", msgb_length(msg)); + if (res <= 0) { + LOGP(DIPATEST, LOGL_ERROR, "Event with no data! %d\n", res); + msgb_free(msg); + return 0; + } + if (osmo_ipa_process_msg(msg) < 0) { LOGP(DIPATEST, LOGL_ERROR, "bad IPA message\n"); msgb_free(msg); diff --git a/examples/ipa-stream-server.c b/examples/ipa-stream-server.c index 5317921..e87eab4 100644 --- a/examples/ipa-stream-server.c +++ b/examples/ipa-stream-server.c @@ -47,8 +47,15 @@ void sighandler(int foo) exit(EXIT_SUCCESS); } -int read_cb(struct osmo_stream_srv *conn, struct msgb *msg) +int read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg) { + if (res <= 0) { + LOGP(DSTREAMTEST, LOGL_ERROR, "cannot receive message (%d)\n", res); + msgb_free(msg); + osmo_stream_srv_destroy(conn); + return -EBADF; + } + LOGP(DSTREAMTEST, LOGL_DEBUG, "received message from stream (payload len=%d)\n", msgb_length(msg)); osmo_ipa_msg_push_headers(msg, osmo_ipa_msgb_cb_proto(msg), osmo_ipa_msgb_cb_proto_ext(msg)); diff --git a/examples/stream-client.c b/examples/stream-client.c index cae0153..6d20263 100644 --- a/examples/stream-client.c +++ b/examples/stream-client.c @@ -54,10 +54,17 @@ static int disconnect_cb(struct osmo_stream_cli *conn) return 0; } -static int read_cb(struct osmo_stream_cli *conn, struct msgb *msg) +static int read_cb(struct osmo_stream_cli *conn, int res, struct msgb *msg) { LOGP(DSTREAMTEST, LOGL_NOTICE, "receiving message from stream... "); + if (res < 0) { + LOGPC(DSTREAMTEST, LOGL_ERROR, "cannot receive message (res = %d)\n", res); + msgb_free(msg); + return 0; + } + + LOGPC(DSTREAMTEST, LOGL_NOTICE, "got %d bytes: %s\n", msg->len, msgb_hexdump(msg)); msgb_free(msg); diff --git a/examples/stream-server.c b/examples/stream-server.c index f6332dc..5295c2b 100644 --- a/examples/stream-server.c +++ b/examples/stream-server.c @@ -3,6 +3,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> #include <osmocom/core/select.h> #include <osmocom/core/socket.h> @@ -44,10 +45,20 @@ void sighandler(int foo) signal(SIGINT, SIG_DFL); } -int read_cb(struct osmo_stream_srv *conn, struct msgb *msg) +int read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg) { LOGP(DSTREAMTEST, LOGL_NOTICE, "receiving message from stream... "); + if (res <= 0) { + if (res < 0) + LOGPC(DSTREAMTEST, LOGL_ERROR, "cannot receive message: %s\n", strerror(-res)); + else + LOGPC(DSTREAMTEST, LOGL_ERROR, "client closed connection\n"); + msgb_free(msg); + osmo_stream_srv_destroy(conn); + return -EBADF; + } + LOGPC(DSTREAMTEST, LOGL_NOTICE, "got %d bytes: %s\n", msg->len, msgb_hexdump(msg)); msgb_free(msg); diff --git a/include/osmocom/netif/stream.h b/include/osmocom/netif/stream.h index 398b277..3c4ec7e 100644 --- a/include/osmocom/netif/stream.h +++ b/include/osmocom/netif/stream.h @@ -102,7 +102,14 @@ struct osmo_stream_srv; typedef int (*osmo_stream_srv_read_cb_t)(struct osmo_stream_srv *conn); typedef int (*osmo_stream_srv_closed_cb_t)(struct osmo_stream_srv *conn); -typedef int (*osmo_stream_srv_read_cb2_t)(struct osmo_stream_srv *conn, struct msgb *msg); + +/*! Completion call-back function when something was read from from the stream client socket. + * \param[in] conn Stream Server that got receive event. + * \param[in] res return value of the read()/recvmsg()/... call, or -errno in case of error. + * \param[in] msg message buffer containing the read data. Ownership is transferred to the + * call-back, and it must make sure to msgb_free() it eventually! */ +typedef int (*osmo_stream_srv_read_cb2_t)(struct osmo_stream_srv *conn, int res, struct msgb *msg); + typedef int (*osmo_stream_srv_segmentation_cb_t)(struct msgb *msg); struct osmo_stream_srv *osmo_stream_srv_create(void *ctx, struct osmo_stream_srv_link *link, int fd, @@ -172,7 +179,14 @@ struct osmo_stream_cli; typedef int (*osmo_stream_cli_connect_cb_t)(struct osmo_stream_cli *cli); typedef int (*osmo_stream_cli_disconnect_cb_t)(struct osmo_stream_cli *cli); typedef int (*osmo_stream_cli_read_cb_t)(struct osmo_stream_cli *cli); -typedef int (*osmo_stream_cli_read_cb2_t)(struct osmo_stream_cli *cli, struct msgb *msg); + +/*! Completion call-back function when something was read from from the stream client socket. + * \param[in] cli Stream Client that got receive event. + * \param[in] res return value of the read()/recvmsg()/... call, or -errno in case of error. + * \param[in] msg message buffer containing the read data. Ownership is transferred to the + * call-back, and it must make sure to msgb_free() it eventually! */ +typedef int (*osmo_stream_cli_read_cb2_t)(struct osmo_stream_cli *cli, int res, struct msgb *msg); + typedef int (*osmo_stream_cli_segmentation_cb_t)(struct msgb *msg); void osmo_stream_cli_set_name(struct osmo_stream_cli *cli, const char *name); diff --git a/src/stream_cli.c b/src/stream_cli.c index 62ea03e..d4067d6 100644 --- a/src/stream_cli.c +++ b/src/stream_cli.c @@ -448,14 +448,23 @@ static void stream_cli_iofd_read_cb(struct osmo_io_fd *iofd, int res, struct msg stream_cli_handle_connecting(cli, res); break; case STREAM_CLI_STATE_CONNECTED: - if (res <= 0) { - LOGSCLI(cli, LOGL_NOTICE, "received result %d in response to read\n", res); + switch (res) { + case -EPIPE: + case -ECONNRESET: + LOGSCLI(cli, LOGL_ERROR, "lost connection with srv (%d)\n", res); osmo_stream_cli_reconnect(cli); - msgb_free(msg); + break; + case 0: + LOGSCLI(cli, LOGL_NOTICE, "connection closed with srv\n"); + osmo_stream_cli_reconnect(cli); + break; + default: + LOGSCLI(cli, LOGL_DEBUG, "received %d bytes from srv\n", res); break; } + /* Notify user of new data or error: */ if (cli->iofd_read_cb) - cli->iofd_read_cb(cli, msg); + cli->iofd_read_cb(cli, res, msg); else msgb_free(msg); break; @@ -503,15 +512,22 @@ static void stream_cli_iofd_recvmsg_cb(struct osmo_io_fd *iofd, int res, struct stream_cli_handle_connecting(cli, res); break; case STREAM_CLI_STATE_CONNECTED: - if (res <= 0) { - LOGSCLI(cli, LOGL_NOTICE, "received result %d in response to recvmsg\n", res); + switch (res) { + case -EPIPE: + case -ECONNRESET: + LOGSCLI(cli, LOGL_ERROR, "lost connection with srv (%d)\n", res); osmo_stream_cli_reconnect(cli); - msgb_free(msg); + break; + case 0: + LOGSCLI(cli, LOGL_NOTICE, "connection closed with srv\n"); + osmo_stream_cli_reconnect(cli); + break; + default: break; } - /* Forward message to read callback, also if the connection failed. */ + /* Notify user of new data or error: */ if (cli->iofd_read_cb) - cli->iofd_read_cb(cli, msg); + cli->iofd_read_cb(cli, res, msg); else msgb_free(msg); break; diff --git a/src/stream_srv.c b/src/stream_srv.c index 74193a4..dad6b7a 100644 --- a/src/stream_srv.c +++ b/src/stream_srv.c @@ -611,26 +611,31 @@ struct osmo_stream_srv { static void stream_srv_iofd_read_cb(struct osmo_io_fd *iofd, int res, struct msgb *msg) { struct osmo_stream_srv *conn = osmo_iofd_get_data(iofd); - LOGSSRV(conn, LOGL_DEBUG, "message received (res=%d)\n", res); - if (OSMO_UNLIKELY(res <= 0)) { - /* This connection is dead, destroy it. */ + switch (res) { + case -EPIPE: + case -ECONNRESET: + LOGSSRV(conn, LOGL_ERROR, "lost connection with client (%d)\n", res); + break; + case 0: + LOGSSRV(conn, LOGL_NOTICE, "connection closed with client\n"); + break; + default: + LOGSSRV(conn, LOGL_DEBUG, "received %d bytes from client\n", res); + break; + } + if (OSMO_UNLIKELY(conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY)) { + LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); msgb_free(msg); - osmo_stream_srv_destroy(conn); - } else { - if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { - LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); - msgb_free(msg); - if (osmo_iofd_txqueue_len(iofd) == 0) - osmo_stream_srv_destroy(conn); - return; - } - - if (conn->iofd_read_cb) - conn->iofd_read_cb(conn, msg); - else - msgb_free(msg); + if (osmo_iofd_txqueue_len(iofd) == 0) + osmo_stream_srv_destroy(conn); + return; } + + if (conn->iofd_read_cb) + conn->iofd_read_cb(conn, res, msg); + else + msgb_free(msg); } static void stream_srv_iofd_write_cb(struct osmo_io_fd *iofd, int res, struct msgb *msg) @@ -658,27 +663,32 @@ static void stream_srv_iofd_recvmsg_cb(struct osmo_io_fd *iofd, int res, struct LOGSSRV(conn, LOGL_DEBUG, "message received (res=%d)\n", res); res = stream_iofd_sctp_recvmsg_trailer(iofd, msg, res, msgh); - if (res == -EAGAIN) - return; - if (OSMO_UNLIKELY(res <= 0)) { - /* This connection is dead, destroy it. */ + switch (res) { + case -EPIPE: + case -ECONNRESET: + LOGSSRV(conn, LOGL_ERROR, "lost connection with client (%d)\n", res); + break; + case 0: + LOGSSRV(conn, LOGL_NOTICE, "connection closed with client\n"); + break; + default: + if (OSMO_LIKELY(res > 0)) + LOGSSRV(conn, LOGL_DEBUG, "received %u bytes from client\n", res); + break; + } + if (OSMO_UNLIKELY(conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY)) { + LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); msgb_free(msg); - osmo_stream_srv_destroy(conn); - } else { - if (conn->flags & OSMO_STREAM_SRV_F_FLUSH_DESTROY) { - LOGSSRV(conn, LOGL_INFO, "Connection is being flushed and closed; ignoring received message\n"); - msgb_free(msg); - if (osmo_iofd_txqueue_len(iofd) == 0) - osmo_stream_srv_destroy(conn); - return; - } - - if (conn->iofd_read_cb) - conn->iofd_read_cb(conn, msg); - else - msgb_free(msg); + if (osmo_iofd_txqueue_len(iofd) == 0) + osmo_stream_srv_destroy(conn); + return; } + + if (conn->iofd_read_cb) + conn->iofd_read_cb(conn, res, msg); + else + msgb_free(msg); } static const struct osmo_io_ops srv_ioops_sctp = { diff --git a/tests/stream/stream_test.c b/tests/stream/stream_test.c index d73dd1d..67f7429 100644 --- a/tests/stream/stream_test.c +++ b/tests/stream/stream_test.c @@ -502,12 +502,19 @@ static void send_last_third(void *osmo_stream_cli_arg) static struct osmo_timer_list fragmented_send_tl_cli; -static int test_segm_ipa_stream_srv_cli_read_cb(struct osmo_stream_cli *osc, struct msgb *msg) +static int test_segm_ipa_stream_srv_cli_read_cb(struct osmo_stream_cli *osc, int res, struct msgb *msg) { unsigned char *data; struct ipa_head *h = (struct ipa_head *) msg->l1h; uint8_t ipac_msg_type = *msg->data; struct msgb *reply; + + if (res < 0) { + fprintf(stderr, "cannot receive message (res = %d)\n", res); + msgb_free(msg); + return -ENOMSG; + } + LOGCLI(osc, "Received message from stream (payload len = %" PRIu16 ")\n", msgb_length(msg)); if (ipac_msg_type < 0 || 5 < ipac_msg_type) { fprintf(stderr, "Received unexpected IPAC message type %"PRIu8"\n", ipac_msg_type); @@ -566,7 +573,7 @@ struct osmo_stream_cli *test_segm_ipa_stream_srv_run_client(void *ctx) return osc; } -int test_segm_ipa_stream_srv_srv_read_cb(struct osmo_stream_srv *conn, struct msgb *msg) +int test_segm_ipa_stream_srv_srv_read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg) { static unsigned msgnum_srv = 0; struct ipa_head *ih = (struct ipa_head *)msg->l1h; @@ -574,6 +581,16 @@ int test_segm_ipa_stream_srv_srv_read_cb(struct osmo_stream_srv *conn, struct ms struct msgb *m; uint8_t msgt; + if (res <= 0) { + if (res < 0) + LOGSRV(conn, "cannot receive message: %s\n", strerror(-res)); + else + LOGSRV(conn, "client closed connection\n"); + msgb_free(msg); + osmo_stream_srv_destroy(conn); + return -EBADF; + } + LOGSRV(conn, "[%u-srv] Received IPA message from stream (payload len = %" PRIu16 ")\n", ++msgnum_srv, msgb_length(msg)); LOGSRV(conn, "\tmsg buff data (including stripped headers): %s\n", @@ -699,12 +716,26 @@ static void send_last_third_srv(void *osmo_stream_srv_arg) osmo_timer_schedule(&fragmented_send_tl_srv_destroy, 0, 2); } -int test_segm_ipa_stream_cli_srv_read_cb(struct osmo_stream_srv *conn, struct msgb *msg) +int test_segm_ipa_stream_cli_srv_read_cb(struct osmo_stream_srv *conn, int res, struct msgb *msg) { unsigned char *data; struct ipa_head *h = (struct ipa_head *) msg->l1h; - uint8_t ipa_msg_type = ((uint8_t *)h)[sizeof(struct ipa_head)]; - struct msgb *reply = msgb_alloc_headroom(128, 0, "IPA reply"); + uint8_t ipa_msg_type; + struct msgb *reply; + + if (res <= 0) { + if (res < 0) + LOGSRV(conn, "cannot receive message: %s\n", strerror(-res)); + else + LOGSRV(conn, "client closed connection\n"); + msgb_free(msg); + osmo_stream_srv_destroy(conn); + return -EBADF; + } + + ipa_msg_type = ((uint8_t *)h)[sizeof(struct ipa_head)]; + + reply = msgb_alloc_headroom(128, 0, "IPA reply"); if (reply == NULL) { fprintf(stderr, "Cannot allocate message\n"); return -ENOMEM; @@ -778,7 +809,7 @@ static int test_segm_ipa_stream_cli_srv_accept_cb(struct osmo_stream_srv_link *s static bool test_segm_ipa_stream_cli_all_msgs_processed = false; -static int test_segm_ipa_stream_cli_cli_read_cb(struct osmo_stream_cli *osc, struct msgb *msg) +static int test_segm_ipa_stream_cli_cli_read_cb(struct osmo_stream_cli *osc, int res, struct msgb *msg) { static unsigned msgnum_cli = 0; unsigned char *data; @@ -875,7 +906,7 @@ int main(void) osmo_gettimeofday_override_time.tv_usec = 0; osmo_init_logging2(tall_test, &osmo_stream_test_log_info); - log_set_log_level(osmo_stderr_target, LOGL_INFO); + log_set_log_level(osmo_stderr_target, LOGL_DEBUG); log_set_use_color(osmo_stderr_target, 0); log_set_print_category_hex(osmo_stderr_target, 0); log_set_print_category(osmo_stderr_target, 0); diff --git a/tests/stream/stream_test.err b/tests/stream/stream_test.err index 6c85c43..5180409 100644 --- a/tests/stream/stream_test.err +++ b/tests/stream/stream_test.err @@ -2,28 +2,50 @@ SRV(srv_link_test,127.0.0.11:1111) accept()ed new link from 127.0.0.1:8976 CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTING} connection established {2.000001} autoreconnecting test step 11 [client NA, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected write +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} sending 29 bytes of data {2.000002} autoreconnecting test step 10 [client NA, server OK], FD reg 1 +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connected read/write (what=0x1) +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) message received +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) received 29 bytes from client {2.000003} autoreconnecting test step 9 [client NA, server OK], FD reg 1 +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connected read/write (what=0x2) +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) sending 11 bytes of data {2.000004} autoreconnecting test step 8 [client NA, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected read +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} message received +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} received 11 bytes from srv {2.000005} autoreconnecting test step 7 [client OK, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected write +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} sending 29 bytes of data {2.000006} autoreconnecting test step 6 [client OK, server OK], FD reg 1 +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connected read/write (what=0x1) +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) message received +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) received 29 bytes from client {2.000007} autoreconnecting test step 5 [client OK, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected read +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} message received CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connection closed with srv +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CLOSED} connection closed CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){WAIT_RECONNECT} retrying reconnect in 9 seconds... {11.000008} autoreconnecting test step 4 [client OK, server OK], FD reg 0 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){WAIT_RECONNECT} reconnecting {11.000009} autoreconnecting test step 3 [client OK, server OK], FD reg 1 SRV(srv_link_test,127.0.0.11:1111) accept()ed new link from 127.0.0.1:8976 CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTING} connection established +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CLOSED} connection closed {11.000010} autoreconnecting test step 2 [client OK, server OK], FD reg 0 +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connected read/write (what=0x1) +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) message received SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connection closed with client {11.000011} autoreconnecting test step 1 [client OK, server NA], FD reg 0 @@ -31,23 +53,63 @@ SRV(srv_link_test,127.0.0.11:1111) accept()ed new link from 127.0.0.1:8976 CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTING} connection established {11.000012} non-reconnecting test step 7 [client NA, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected write +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} sending 29 bytes of data {11.000013} non-reconnecting test step 6 [client NA, server OK], FD reg 1 +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connected read/write (what=0x1) +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) message received +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) received 29 bytes from client {11.000014} non-reconnecting test step 5 [client NA, server OK], FD reg 1 +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connected read/write (what=0x2) +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) sending 11 bytes of data {11.000015} non-reconnecting test step 4 [client NA, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected read +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} message received +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} received 11 bytes from srv {11.000016} non-reconnecting test step 3 [client OK, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected write +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} sending 29 bytes of data {11.000017} non-reconnecting test step 2 [client OK, server OK], FD reg 1 +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) connected read/write (what=0x1) +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) message received +SRVCONN(srv_test,r=127.0.0.1:8976<->l=127.0.0.11:1111) received 29 bytes from client {11.000018} non-reconnecting test step 1 [client OK, server OK], FD reg 1 +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connected read +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} message received CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CONNECTED} connection closed with srv +CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CLOSED} connection closed CLICONN(cli_test,r=127.0.0.11:1111<->l=127.0.0.1:8976){CLOSED} not reconnecting, disabled {20.000019} non-reconnecting test step 0 [client OK, server OK], FD reg 0 SRV(srv_link_test,127.0.0.11:1111) accept()ed new link from 127.0.0.1:8977 CLICONN(,r=127.0.0.11:1111<->l=127.0.0.1:8977){CONNECTING} connection established +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) received 24 bytes from client +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) received 24 bytes from client +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) received 24 bytes from client +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) received 24 bytes from client +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) connected write +CLICONN(,r=127.0.0.11:1111<->l=127.0.0.1:8977){CONNECTED} received 6 bytes from srv +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) received 10 bytes from client +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) received 10 bytes from client +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1111) received 10 bytes from client +CLICONN(,r=127.0.0.11:1111<->l=127.0.0.1:8977){CLOSED} connection closed SRV(srv_link_test,127.0.0.11:1112) accept()ed new link from 127.0.0.1:8977 CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTING} connection established +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1112) connected write +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTED} received 24 bytes from srv +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTED} received 24 bytes from srv +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTED} received 24 bytes from srv +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTED} received 24 bytes from srv +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1112) received 6 bytes from client +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1112) connected write +SRVCONN(,r=127.0.0.1:8977<->l=127.0.0.11:1112) connected write +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTED} received 10 bytes from srv +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTED} received 10 bytes from srv +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CONNECTED} received 10 bytes from srv +CLICONN(,r=127.0.0.11:1112<->l=127.0.0.1:8977){CLOSED} connection closed |