diff --git a/scripts/Makefile b/scripts/Makefile index 876e673..197bb68 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -896,7 +896,19 @@ jan_battle_light: jan_dcall_normal: ./run-3 \ 1,jan_dcall_normal. \ - dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 150. \ - dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 150. \ + dcall-simple-client 1 360, + dcall-dup2-client 2 352, + dcall-lightning-client 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \ + dcall-lightning-client 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176. \ + dcall-simple-server 1 360, + dcall-dup2-server 2 352, + dcall-lightning-server 12 fast_count=3!tick_tock=1!measlat=0!window=2000 213, \ + dcall-lightning-server 12 fast_count=3!tick_tock=0!measlat=0!window=2000 176. \ + tor2 -f /etc/torrc_guard_12, \ + tor2 -f /etc/torrc_guard_12, \ + tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12. \ + tor2 -f /etc/torrc_guard_12, \ + tor2 -f /etc/torrc_guard_12, \ + tor2 -f /etc/torrc_guard_12, \ tor2 -f /etc/torrc_guard_12. diff --git a/scripts/container/dcall-dup2-client b/scripts/container/dcall-dup2-client new file mode 100755 index 0000000..eb8ea62 --- /dev/null +++ b/scripts/container/dcall-dup2-client @@ -0,0 +1,20 @@ +#!/bin/bash +mkdir -p $3/{log,shared,res} + +donar \ + -a dup2 \ + -c \ + -o $3/shared/onion_services.pub \ + -l $1 \ + -e 5000 \ + -r 5000 \ +> $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log & + +dcall \ + -t filesrc \ + -a file:///assets/i_have_a_dream.mp3 \ + -s fakesink \ + -b 127.0.0.1 \ + -l $2 \ + -d $3/log/client-dcall-gstreamer.log \ +> $3/log/client-dcall-stdout.log 2> $3/log/client-dcall-stderr.log diff --git a/scripts/container/dcall-dup2-server b/scripts/container/dcall-dup2-server new file mode 100755 index 0000000..84d5d14 --- /dev/null +++ b/scripts/container/dcall-dup2-server @@ -0,0 +1,20 @@ +#!/bin/bash +mkdir -p $3/{log,shared} +cd $3/shared + +donar \ + -a dup2 \ + -s \ + -l $1 \ + -e 5000 \ + -r 5000 \ +> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & + +dcall \ + -t filesrc \ + -a file:///assets/i_have_a_dream.mp3 \ + -s fakesink \ + -b 127.0.0.1 \ + -l $2 \ + -d ../log/server-dcall-gstreamer.log \ +> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log diff --git a/scripts/container/dcall-simple-client b/scripts/container/dcall-simple-client new file mode 100755 index 0000000..a134737 --- /dev/null +++ b/scripts/container/dcall-simple-client @@ -0,0 +1,20 @@ +#!/bin/bash +mkdir -p $3/{log,shared,res} + +donar \ + -a naive \ + -c \ + -o $3/shared/onion_services.pub \ + -l $1 \ + -e 5000 \ + -r 5000 \ +> $3/log/client-donar-stdout.log 2> $3/log/client-donar-stderr.log & + +dcall \ + -t filesrc \ + -a file:///assets/i_have_a_dream.mp3 \ + -s fakesink \ + -b 127.0.0.1 \ + -l $2 \ + -d $3/log/client-dcall-gstreamer.log \ +> $3/log/client-dcall-stdout.log 2> $3/log/client-dcall-stderr.log diff --git a/scripts/container/dcall-simple-server b/scripts/container/dcall-simple-server new file mode 100755 index 0000000..eae200a --- /dev/null +++ b/scripts/container/dcall-simple-server @@ -0,0 +1,20 @@ +#!/bin/bash +mkdir -p $3/{log,shared} +cd $3/shared + +donar \ + -a naive \ + -s \ + -l $1 \ + -e 5000 \ + -r 5000 \ +> ../log/server-donar-stdout.log 2> ../log/server-donar-stderr.log & + +dcall \ + -t filesrc \ + -a file:///assets/i_have_a_dream.mp3 \ + -s fakesink \ + -b 127.0.0.1 \ + -l $2 \ + -d ../log/server-dcall-gstreamer.log \ +> ../log/server-dcall-stdout.log 2> ../log/server-dcall-stderr.log diff --git a/src/algo_naive.c b/src/algo_naive.c index 8b7a51e..d791caa 100644 --- a/src/algo_naive.c +++ b/src/algo_naive.c @@ -49,6 +49,11 @@ int algo_naive_on_datagram(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdi } int algo_naive_on_err(struct evt_core_ctx *ctx, struct evt_core_fdinfo *fdinfo) { - // We do nothing + struct algo_ctx* app_ctx = fdinfo->cat->app_ctx; + if (strcmp("tcp-read", fdinfo->cat->name) == 0 || strcmp("tcp-write", fdinfo->cat->name) == 0) + return app_ctx->ap.sr(ctx, fdinfo); + + fprintf(stderr, "%s is not eligible for a reconnect\n", fdinfo->url); + // We do nothing return 1; }