Editing
Common Text-based Response Protocol
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Infobox protocol | name = Common Text-based Response Protocol | developer = [[secondtruthLabs]] | status = Stable | first_published = 2025 | latest_version = 1.0 | transport = [[wp:Transmission Control Protocol|TCP]] | encoding = [[wp:UTF-8|UTF-8]] | license = [[wp:Public domain|Public Domain]] }} The '''Common Text-based Response Protocol''' ('''CTRP''') is a foundation protocol for building lightweight, text-based application protocols over [[wp:Transmission Control Protocol|TCP]]. Developed by [[secondtruthLabs]], it defines common conventions for simple request-response communication patterns. == Overview == CTRP serves as a base layer upon which application-specific protocols can be built. Rather than defining a complete application protocol itself, CTRP establishes conventions for message formatting, status codes, and connection handling that derived protocols inherit and extend. === Design philosophy === CTRP follows a minimalist approach inspired by classic internet protocols like [[wp:Finger protocol|Finger]] and [[wp:Gopher (protocol)|Gopher]]. Key principles include: * Simple enough to implement in a weekend * Consistent patterns across derived protocols * Optimized for text content delivery * Minimal overhead == Technical specification == === Request format === Requests consist of a single line terminated by [[wp:CRLF|CRLF]] (<code>\r\n</code>): {{Code example | language = text | caption = Basic request format | code = COMMAND [arguments]\r\n }} The maximum request line length is 1024 bytes. === Response format === Responses begin with a status line, followed by optional content: {{Code example | language = text | caption = Response format | code = <status_code> <status_message>\r\n [content lines]\r\n .\r\n }} Content is terminated by a line containing only a period (<code>.</code>). === Status codes === CTRP uses a hierarchical status code system: {| class="wikitable" |- ! Range !! Category !! Description |- | 1x || Informational || Request received, continuing process |- | 2x || Success || Request successfully processed |- | 3x || Redirection || Further action needed |- | 4x || Client Error || Request contains bad syntax or cannot be fulfilled |- | 5x || Server Error || Server failed to fulfill valid request |- | 6x || Service Error || Service-level issues |} Common status codes: {| class="wikitable" |- ! Code !! Message !! Meaning |- | 20 || OK || Success |- | 21 || OK+MORE || Success, more content available |- | 40 || BAD REQUEST || Malformed request |- | 41 || NOT FOUND || Requested resource not found |- | 42 || FORBIDDEN || Access denied |- | 50 || ERROR || General server error |- | 51 || NOT IMPLEMENTED || Command not supported |} === Encoding === All CTRP communication uses UTF-8 encoding with CRLF line endings. This ensures consistent handling across platforms while supporting international character sets. === Transport security === CTRP supports optional [[wp:Transport Layer Security|TLS]] encryption. Implementations typically offer both plain TCP and TLS-secured connections on separate ports. == Derived protocols == The following protocols are built on CTRP: * [[AgentFinger]] β AI agent discovery and information == See also == * [[AgentFinger]] * [[Trivial Service Discovery Protocol]] * [[wp:Finger protocol]] * [[wp:Gopher (protocol)]] == References == {{Reflist}} == External links == * [https://github.com/secondtruth/ctrp CTRP Specification Repository] [[Category:Communication Protocols]] [[Category:Request-Response Protocols]] [[Category:Foundation Protocols]] {{stLabs protocol}}
Summary:
Please note that all contributions to secondtruthLabs Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
secondtruthLabs Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Code example
(
edit
)
Template:Infobox protocol
(
edit
)
Template:Reflist
(
edit
)
Template:StLabs protocol
(
edit
)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information