From d591a2b505cc7af4aaf4b1abbdc124a782c1e74e Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 7 May 2015 10:06:08 +0200 Subject: [PATCH] added simple loopback config example --- server/etc/loopback.conf | 42 +++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/server/etc/loopback.conf b/server/etc/loopback.conf index 6ccf85884..30eece1e0 100644 --- a/server/etc/loopback.conf +++ b/server/etc/loopback.conf @@ -1,17 +1,49 @@ # This is an example for a minimal configuration # # All messages will be sent back to the origin. +# +# You can use this configuration in conjunction with the 'send', 'receive' and 'random' +# utilities as shown below (run all three steps in parallel). +# +# 0. Overview: +# +# ./random --PIPE--> ./send --UDP--> ./server --UDP--> ./receive +# +# 1. Start server: +# +# $ ./server etc/loopback.conf +# +# 2. Send random data to server: +# +# $ ./random 4 10 | ./send etc/loopback.conf node1 -r +# +# 3. Receive data from server: +# +# $ ./receive etc/loopback.conf node2 -r +# +## + +stats = 1; +debug = 10; nodes = { - node = { - local = "*:12001", # Local ip:port, use '*' for random port - remote = "127.0.0.1:12000" + node1 = { + type = "udp", + local = "*:12000", # Local ip:port, use '*' for random port + remote = "127.0.0.1:12001" + }, + node2 = { + type = "udp", + local = "*:12002", # Local ip:port, use '*' for random port + remote = "127.0.0.1:12003" + combine = 30 } }; paths = ( { - in = "node", # Name of the node we listen to (see above) - out = "node" # And we loop back to the origin + in = "node1", # Name of the node we listen to (see above) + out = "node2" # And we loop back to the origin + hook = "decimate" } );