Module protocol

Module protocol 

Source
Expand description

NNTP protocol handling module

This module contains response parsing and protocol utilities for NNTP communication.

Structs§

NntpResponse
Represents a parsed NNTP response
ResponseParser
Response parser for NNTP protocol

Enums§

ResponseCode
Categorized NNTP response code for type-safe handling

Constants§

AUTH_ACCEPTED
Authentication accepted response (281)
AUTH_REQUIRED
Authentication required response (381)
BACKEND_ERROR
Backend error response (503)
BACKEND_UNAVAILABLE
Backend server unavailable response (400)
COMMAND_NOT_SUPPORTED
Command not supported response (500)
COMMAND_NOT_SUPPORTED_STATELESS
Command not supported in stateless proxy mode (500)
CONNECTION_CLOSING
Connection closing response (205)
CRLF
Line ending: “\r\n”
DATE
DATE command (RFC 3977 Section 7.1)
GOODBYE
Goodbye message (205) - common in tests
MIN_RESPONSE_LENGTH
Minimum response length (3-digit code + CRLF)
MULTILINE_TERMINATOR
Multiline response terminator: “\r\n.\r\n” (RFC 3977)
PROXY_GREETING_PCR
Proxy greeting for per-command routing mode (200)
QUIT
QUIT command (RFC 3977 Section 5.4)
TERMINATOR_TAIL_SIZE
Terminator tail size for spanning terminator detection

Functions§

article_by_msgid
Construct ARTICLE command with message-ID (RFC 3977 Section 6.2.1)
authinfo_pass
Construct AUTHINFO PASS command (RFC 4643 Section 2.4)
authinfo_user
Construct AUTHINFO USER command (RFC 4643 Section 2.3)
body_by_msgid
Construct BODY command with message-ID (RFC 3977 Section 6.2.3)
error_response
Construct a generic error response with custom code and message
greeting
Construct a greeting response (200)
greeting_readonly
Construct a read-only greeting response (201)
head_by_msgid
Construct HEAD command with message-ID (RFC 3977 Section 6.2.2)
ok_response
Construct a generic OK response (200)
response
Construct a response with custom status code and message
send_proxy_greeting
Send NNTP proxy greeting to a client
stat_by_msgid
Construct STAT command with message-ID (RFC 3977 Section 6.2.4)