summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Doc/lib/libgopherlib.tex
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
commit458120dd40db6b4df55a4e96b650e16798ef06a0 (patch)
tree8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/python/Doc/lib/libgopherlib.tex
parent3a742c699f6806c1145aea5149bf15de15a0afd7 (diff)
add hg and python
Diffstat (limited to 'sys/src/cmd/python/Doc/lib/libgopherlib.tex')
-rw-r--r--sys/src/cmd/python/Doc/lib/libgopherlib.tex36
1 files changed, 36 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Doc/lib/libgopherlib.tex b/sys/src/cmd/python/Doc/lib/libgopherlib.tex
new file mode 100644
index 000000000..4b2260531
--- /dev/null
+++ b/sys/src/cmd/python/Doc/lib/libgopherlib.tex
@@ -0,0 +1,36 @@
+\section{\module{gopherlib} ---
+ Gopher protocol client}
+
+\declaremodule{standard}{gopherlib}
+\modulesynopsis{Gopher protocol client (requires sockets).}
+
+\deprecated{2.5}{The \code{gopher} protocol is not in active use
+ anymore.}
+
+\indexii{Gopher}{protocol}
+
+This module provides a minimal implementation of client side of the
+Gopher protocol. It is used by the module \refmodule{urllib} to
+handle URLs that use the Gopher protocol.
+
+The module defines the following functions:
+
+\begin{funcdesc}{send_selector}{selector, host\optional{, port}}
+Send a \var{selector} string to the gopher server at \var{host} and
+\var{port} (default \code{70}). Returns an open file object from
+which the returned document can be read.
+\end{funcdesc}
+
+\begin{funcdesc}{send_query}{selector, query, host\optional{, port}}
+Send a \var{selector} string and a \var{query} string to a gopher
+server at \var{host} and \var{port} (default \code{70}). Returns an
+open file object from which the returned document can be read.
+\end{funcdesc}
+
+Note that the data returned by the Gopher server can be of any type,
+depending on the first character of the selector string. If the data
+is text (first character of the selector is \samp{0}), lines are
+terminated by CRLF, and the data is terminated by a line consisting of
+a single \samp{.}, and a leading \samp{.} should be stripped from
+lines that begin with \samp{..}. Directory listings (first character
+of the selector is \samp{1}) are transferred using the same protocol.