This commit is contained in:
asus
2023-02-20 16:19:41 +01:00
parent 3ed006b652
commit 1d690b43bd
9 changed files with 12371 additions and 75 deletions

37
tester_1.sh Normal file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
port=0
while [ "$port" -lt 1024 -o "$port" -gt 10000 ]
do
port=$RANDOM
done
id=0
launch() {
while read -r line
do
echo "receiver $id: $line"
done < <(nc 127.0.0.1 "$port" 2>&1) &
((++id))
}
clang -Wall -Wextra -Werror mini_serv.c
./a.out "$port" 2>&1 &
launch
#launch
#launch
#launch
#kill -KILL $(pidof nc | tr ' ' '\n' | head -n1 )
#launch
#kill -KILL $(pidof nc | tr ' ' '\n' | head -n1 )
#launch
#kill -KILL $(pidof nc | tr ' ' '\n' | head -n1 )
for i in {1..30}
do
launch
kill -KILL $(pidof nc | tr ' ' '\n' | head -n1 )
done
killall -q a.out nc