summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libsocket.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-02-13 06:58:54 (GMT)
committerFred Drake <fdrake@acm.org>1998-02-13 06:58:54 (GMT)
commit1947991c2f85db781fb3fcdc9e3bcfe2905e58e2 (patch)
tree260789493c7151408f009eaa84a7815ce4d28246 /Doc/lib/libsocket.tex
parentdc8af0acc1fbeec89e43f1ea43bf1a4d016f4fc6 (diff)
downloadcpython-1947991c2f85db781fb3fcdc9e3bcfe2905e58e2.zip
cpython-1947991c2f85db781fb3fcdc9e3bcfe2905e58e2.tar.gz
cpython-1947991c2f85db781fb3fcdc9e3bcfe2905e58e2.tar.bz2
Remove all \bcode / \ecode cruft; this is no longer needed. See previous
checkin of myformat.sty. Change "\renewcommand{\indexsubitem}{(...)}" to "\setindexsubitem{(...)}" everywhere. Some other minor nits that I happened to come across.
Diffstat (limited to 'Doc/lib/libsocket.tex')
-rw-r--r--Doc/lib/libsocket.tex12
1 files changed, 6 insertions, 6 deletions
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex
index 41b27f9..9b71f1f 100644
--- a/Doc/lib/libsocket.tex
+++ b/Doc/lib/libsocket.tex
@@ -47,7 +47,7 @@ method.
The module \code{socket} exports the following constants and functions:
-\renewcommand{\indexsubitem}{(in module socket)}
+\setindexsubitem{(in module socket)}
\begin{excdesc}{error}
This exception is raised for socket- or address-related errors.
The accompanying value is either a string telling what went wrong or a
@@ -190,7 +190,7 @@ Socket objects have the following methods. Except for
\code{makefile()} these correspond to \UNIX{} system calls applicable to
sockets.
-\renewcommand{\indexsubitem}{(socket method)}
+\setindexsubitem{(socket method)}
\begin{funcdesc}{accept}{}
Accept a connection.
The socket must be bound to an address and listening for connections.
@@ -343,7 +343,7 @@ Also note that the server does not \code{send}/\code{receive} on the
socket it is listening on but on the new socket returned by
\code{accept}.
-\bcode\begin{verbatim}
+\begin{verbatim}
# Echo server program
from socket import *
HOST = '' # Symbolic name meaning the local host
@@ -358,9 +358,9 @@ while 1:
if not data: break
conn.send(data)
conn.close()
-\end{verbatim}\ecode
+\end{verbatim}
%
-\bcode\begin{verbatim}
+\begin{verbatim}
# Echo client program
from socket import *
HOST = 'daring.cwi.nl' # The remote host
@@ -371,7 +371,7 @@ s.send('Hello, world')
data = s.recv(1024)
s.close()
print 'Received', `data`
-\end{verbatim}\ecode
+\end{verbatim}
%
\begin{seealso}
\seemodule{SocketServer}{classes that simplify writing network servers}