Add the man-page
This commit is contained in:
parent
cb75da4997
commit
106b6542b4
3
Makefile
3
Makefile
|
@ -1,4 +1,5 @@
|
||||||
.POSIX:
|
.POSIX:
|
||||||
|
MANDOCFLAGS=-Ios= -Tascii -Omdoc -Owidth=72
|
||||||
MAGIC= case "`uname | tr A-Z a-z`" in\
|
MAGIC= case "`uname | tr A-Z a-z`" in\
|
||||||
*linux*)export CFLAGS="$$CFLAGS -D_XOPEN_SOURCE";\
|
*linux*)export CFLAGS="$$CFLAGS -D_XOPEN_SOURCE";\
|
||||||
export CFLAGS="$$CFLAGS -D_DEFAULT_SOURCE";\
|
export CFLAGS="$$CFLAGS -D_DEFAULT_SOURCE";\
|
||||||
|
@ -23,5 +24,7 @@ install: gemini-echo-server
|
||||||
"$$DESTDIR/$${PREFIX:-/usr/local}/bin/"
|
"$$DESTDIR/$${PREFIX:-/usr/local}/bin/"
|
||||||
linstall: gemini-echo-server
|
linstall: gemini-echo-server
|
||||||
install -m755 gemini-echo-server "$$HOME/bin/"
|
install -m755 gemini-echo-server "$$HOME/bin/"
|
||||||
|
README: gemini-echo-server.1
|
||||||
|
mandoc ${MANDOCFLAGS} gemini-echo-server.1 | col -b > $@
|
||||||
clean:
|
clean:
|
||||||
rm -f gemini-echo-server
|
rm -f gemini-echo-server
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
GEMINI-ECHO-SERVER(1) General Commands Manual GEMINI-ECHO-SERVER(1)
|
||||||
|
|
||||||
|
NAME
|
||||||
|
gemini-echo-server - echo Gemini queries as responses
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
gemini-echo-server [-D pid-file] [-b backlog]
|
||||||
|
[-m maximum-connections] [-p port]
|
||||||
|
[-s slowdown-divisor] [-t timeout] -c cert-file
|
||||||
|
-k key-file [host ...]
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
This server echos any query back as a plain-text UTF-8 document,
|
||||||
|
unescaped, and ending in a line-feed. It also prints the escaped
|
||||||
|
query to the standard output.
|
||||||
|
|
||||||
|
The options are as follows:
|
||||||
|
|
||||||
|
-D pid-file
|
||||||
|
If this option is present gemini-echo-server writes calls
|
||||||
|
daemon(3) on itself and attempts to write its PID to
|
||||||
|
pid-file.
|
||||||
|
|
||||||
|
-c cert-file
|
||||||
|
The TLS certificate to use.
|
||||||
|
|
||||||
|
-b backlog
|
||||||
|
The backlog for listen(2).
|
||||||
|
|
||||||
|
-k key-file
|
||||||
|
The TLS key to use.
|
||||||
|
|
||||||
|
-m maximum-connections
|
||||||
|
The maximum number of simultaneous connections to allow.
|
||||||
|
|
||||||
|
-p port
|
||||||
|
The port to listen on.
|
||||||
|
|
||||||
|
-s slowdown-divisor
|
||||||
|
The divisor to use to calculate how many connections to
|
||||||
|
allow before the server starts telling clients to slow-
|
||||||
|
down.
|
||||||
|
|
||||||
|
The calculation is as follows:
|
||||||
|
|
||||||
|
M - ceil(M / S)
|
||||||
|
|
||||||
|
Where M is maximum-connections and S is slowdown-divisor.
|
||||||
|
|
||||||
|
-t timeout
|
||||||
|
The timeout to use before disconnecting clients. It is
|
||||||
|
also used as the timeout for poll(2).
|
||||||
|
|
||||||
|
SEE ALSO
|
||||||
|
listen(2), getaddrinfo(3), tls_config_set_cert_file(3),
|
||||||
|
tls_config_set_key_file(3)
|
||||||
|
|
||||||
|
May 9, 2020
|
|
@ -0,0 +1,69 @@
|
||||||
|
.Dd May 9, 2020
|
||||||
|
.Dt GEMINI-ECHO-SERVER 1
|
||||||
|
.Os
|
||||||
|
.Sh NAME
|
||||||
|
.Nm gemini-echo-server
|
||||||
|
.Nd echo Gemini queries as responses
|
||||||
|
.Sh SYNOPSIS
|
||||||
|
.Nm
|
||||||
|
.Op Fl D Ar pid-file
|
||||||
|
.Op Fl b Ar backlog
|
||||||
|
.Op Fl m Ar maximum-connections
|
||||||
|
.Op Fl p Ar port
|
||||||
|
.Op Fl s Ar slowdown-divisor
|
||||||
|
.Op Fl t Ar timeout
|
||||||
|
.Fl c Ar cert-file
|
||||||
|
.Fl k Ar key-file
|
||||||
|
.Op Ar host ...
|
||||||
|
.Sh DESCRIPTION
|
||||||
|
This server echos any query back as a plain-text UTF-8 document,
|
||||||
|
unescaped, and ending in a line-feed.
|
||||||
|
It also prints the escaped query to the standard output.
|
||||||
|
.Pp
|
||||||
|
The options are as follows:
|
||||||
|
.Bl -tag -width Ds
|
||||||
|
.It Fl D Ar pid-file
|
||||||
|
If this option is present
|
||||||
|
.Nm
|
||||||
|
writes calls
|
||||||
|
.Xr daemon 3
|
||||||
|
on itself and attempts to write its PID to
|
||||||
|
.Ar pid-file .
|
||||||
|
.It Fl c Ar cert-file
|
||||||
|
The TLS certificate to use.
|
||||||
|
.It Fl b Ar backlog
|
||||||
|
The backlog for
|
||||||
|
.Xr listen 2 .
|
||||||
|
.It Fl k Ar key-file
|
||||||
|
The TLS key to use.
|
||||||
|
.It Fl m Ar maximum-connections
|
||||||
|
The maximum number of simultaneous connections to allow.
|
||||||
|
.It Fl p Ar port
|
||||||
|
The port to listen on.
|
||||||
|
.It Fl s Ar slowdown-divisor
|
||||||
|
The divisor to use to calculate how many connections to allow before
|
||||||
|
the server starts telling clients to slow-down.
|
||||||
|
.Pp
|
||||||
|
The calculation is as follows:
|
||||||
|
.Bd -literal -offset indent
|
||||||
|
M - ceil(M / S)
|
||||||
|
.Ed
|
||||||
|
.Pp
|
||||||
|
Where
|
||||||
|
.Li M
|
||||||
|
is
|
||||||
|
.Ar maximum-connections
|
||||||
|
and
|
||||||
|
.Li S
|
||||||
|
is
|
||||||
|
.Ar slowdown-divisor .
|
||||||
|
.It Fl t Ar timeout
|
||||||
|
The timeout to use before disconnecting clients.
|
||||||
|
It is also used as the timeout for
|
||||||
|
.Xr poll 2 .
|
||||||
|
.El
|
||||||
|
.Sh SEE ALSO
|
||||||
|
.Xr listen 2 ,
|
||||||
|
.Xr getaddrinfo 3 ,
|
||||||
|
.Xr tls_config_set_cert_file 3 ,
|
||||||
|
.Xr tls_config_set_key_file 3
|
Loading…
Reference in New Issue