Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Relevant local RFC text is under `docs/standards/rfcs/`. For this client, start

`CacheListenerService` binds the configured TLS endpoints and admits connections up to `MaxActiveConnections`. Each admitted socket disables Nagle and receives its own send and receive buffer limits immediately after accept and before TLS. Listening-socket options are not inherited. A socket-option failure disposes that socket and releases the admission slot. The configured sizes are kernel buffer limits; the operating system may round them, and they are not a measured congestion window. Each admitted socket then gets one TLS 1.2 or 1.3 handshake with no client certificate and revocation checks off. The certificate lease is taken per connection and disposed with that connection. After the handshake succeeds, `NntpCacheListenerSession` uses `StreamCacheListenerTransport`. The session does not own the socket or the certificate. `IoProgressTimeout` is one no-progress deadline for each read and each non-empty write on that connection. Completing the call is progress, and the next call gets a new deadline. The session passes each logical buffer — the status line, the article image, and the terminating `.\r\n` — in its own write. It does not slice a buffer into 32 KiB pieces. `Stream.WriteAsync` accepts the supplied buffer or throws, so that deadline covers the whole buffer and is not reset mid-call. A transport that returns a shorter positive count has made progress: the session continues at the first unaccepted byte, and the next write gets a new deadline. Shutdown cancellation, handshake failure, timeout, I/O, and other connection failures use the same listener logs as before.

The greeting is `201 NNTP Service Ready, posting prohibited` because posting is not implemented. It is sent before any command response. Command keywords are ASCII case-insensitive. One or more spaces or tabs separate the keyword from its argument. Lines end in CRLF. A command longer than 512 octets, including CRLF, is answered with `501 Syntax error` and is not split into a later command. Bytes after one command stay in the buffer. `QUIT` with no argument sends `205 Connection closing` and returns; the service then closes the connection. `QUIT` with an argument is `501` and the connection stays open. `DATE` with no argument sends `111` and fourteen UTC digits `yyyymmddhhmmss` from the same `TimeProvider` used for article admission, then waits for another command. `DATE` with an argument is `501` and the connection stays open. Any other command is `500 Unknown command`. A peer close ends the session without another response.
The greeting is `201 NNTP Service Ready, posting prohibited` because posting is not implemented. It is sent before any command response. Command keywords are ASCII case-insensitive. One or more spaces or tabs separate the keyword from its argument. Lines end in CRLF. A command longer than 512 octets, including CRLF, is answered with `501 Syntax error` and is not split into a later command. Bytes after one command stay in the buffer. The command being handled stays at the front of that buffer until its response writes finish, so the session reads the line and the Message-ID from those bytes. The `220` and `111` lines are formatted into buffers owned by that session and are not overwritten until the write of that line has returned. `QUIT` with no argument sends `205 Connection closing` and returns; the service then closes the connection. `QUIT` with an argument is `501` and the connection stays open. `DATE` with no argument sends `111` and fourteen UTC digits `yyyymmddhhmmss` from the same `TimeProvider` used for article admission, then waits for another command. `DATE` with an argument is `501` and the connection stays open. Any other command is `500 Unknown command`. A peer close ends the session without another response.

`ARTICLE` with no argument, or with an all-digit article number, is `412 No newsgroup selected`. There is no selected group. Extra arguments, or a Message-ID that fails `NntpMessageIdValidation`, are `501 Syntax error`. That validator is the RFC 5536 grammar already used by article admission, so it is stricter than an opaque RFC 3977 message-id. A valid Message-ID that is not retained is `430 No Such Article Found`.

Expand Down
Loading
Loading