From e183f9cd23380a81071c32f64c91e60f46a7d8cb Mon Sep 17 00:00:00 2001 From: tjpcc Date: Wed, 11 Jan 2023 10:36:56 -0700 Subject: lots more documentation comments --- gemini/request.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'gemini/request.go') diff --git a/gemini/request.go b/gemini/request.go index 43ee69b..933281b 100644 --- a/gemini/request.go +++ b/gemini/request.go @@ -14,10 +14,26 @@ var InvalidRequestLineEnding = errors.New("invalid request line ending") // Request represents a request over the gemini protocol. type Request struct { + // URL is the specific URL being fetched by the request. *url.URL + // Server is the server which received the request. + // + // This is only populated in gemini servers. + // It is unused on the client end. Server *Server + + // RemoteAddr is the address of the other side of the connection. + // + // This will be the server address for clients, or the connecting + // client's address in servers. + // + // Be aware though that proxies (and reverse proxies) can confuse this. RemoteAddr net.Addr + + // TLSState contains information about the TLS encryption over the connection. + // + // This includes peer certificates and version information. TLSState *tls.ConnectionState } -- cgit v1.2.3