]> Sergey Matveev's repositories - paster.git/blobdiff - doc/protocol.texi
Netstrings are simpler than bencode
[paster.git] / doc / protocol.texi
index 491cc790508088412c979c3e14cdf2a4d598b6a6..e1c0acc5553bad9cda348bcc3cb841b14a04d9bd 100644 (file)
@@ -1,16 +1,12 @@
 @node Protocol
 @unnumbered Protocol
 
-Protocol is very simple: @url{https://en.wikipedia.org/wiki/Bencode, bencode}d
-dictionary is sent over TCP.
-
-@itemize
-@item @code{v} key contains the data you want to paste
-@item optional @code{e} key, holding the desired filename extension,
-    without the leading dot, up to 9 characters long
-@end itemize
+Protocol is very simple: two
+@url{https://en.wikipedia.org/wiki/Netstring, netstring}s are sent over TCP.
+First one holds desired filename extension, without the leading dot, up to 9
+characters long. Second one is the paste data itself.
 
 @example
-"hello world" => d1:v11:hello worlde
-"http://example.com/" and "url" extension => d1:e3:url1:v18:http://example.come
+  "hello world", no explicit extension => 0:,11:hello world,
+"http://example.com/", "url" extension => 3:url,18:http://example.com,
 @end example