A Gemini echo server. Probably over-engineered for what it does.
Go to file
styan 5ea99bf7f5 Fix the default MANDIR 2020-05-17 00:20:28 +00:00
Makefile Fix the default MANDIR 2020-05-17 00:20:28 +00:00
README Add the man-page 2020-05-09 05:39:20 +00:00
gemini-echo-server.1 Add the man-page 2020-05-09 05:39:20 +00:00
gemini-echo-server.c Improve exiting when signaled 2020-05-09 11:02:30 +00:00

README

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