a.out -v -t 8001 N L A E Xo echo ok
a.out -v -t 8001 N L A E S:ok\\n
a.out -v -t 8001 N L A S:"HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n" Xo date +"%a, %d %b %Y %H:%M:%S GMT"
a.out 8001 C S G Q Xi cat
a.out example.com:80 C S:"GET / HTTP/1.1\r\nHost: example.com\r\nConnection: close\r\n\r\n" Xi cat
client example illustrating combined use of S: plus S- and R
x=microsoft
y=github.com
set -x
z=$(
echo "GET /orgs/$x/repositories?type=all HTTP/1.0@#Host: github.com@#" \
|tr @# '\r\n' \
|a.out $y:80 C S- R146000 Xi sed -n '/pageCount\":/{s/.*pageCount\"://;s/,.*//;p;q;}'
)
test $z||exit
seq -f 'GET /orgs/'$x'/repositories?type=all&page=%g HTTP/1.1@#Host: github.com@#Connection: keep-alive@#' 1 $z \
|tr @# '\r\n' \
|a.out $y:80 C S- S:"HEAD / HTTP/1.0\r\nHost: 127.0.0.1\r\nConnection: close\r\n\r\n" Xi \
sh -c "echo '<base href=https://github.com />';yy045"
# seq -f 'https://'$y'/orgs/'$x'/repositories?type=all&page=%g' 1 $z \
# |yy025 \
# |a.out $y:80 C S- Xi yy045 \
# |sed '1s|^|<base href=https://github.com />|'
.
default backlog is 1000 client example illustrating combined use of S: plus S- and R