gemini-echo-server/gemini-echo-server.1

70 lines
1.5 KiB
Groff

.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