Documentation clarified re. config socket listener protocol

This commit is contained in:
Vinay Sajip 2005-06-05 20:39:36 +00:00
parent b6c1bb883e
commit 4c1423bb7a
2 changed files with 7 additions and 4 deletions

View File

@ -1396,7 +1396,10 @@ configurations. If no port is specified, the module's default
will be sent as a file suitable for processing by \function{fileConfig()}. will be sent as a file suitable for processing by \function{fileConfig()}.
Returns a \class{Thread} instance on which you can call \method{start()} Returns a \class{Thread} instance on which you can call \method{start()}
to start the server, and which you can \method{join()} when appropriate. to start the server, and which you can \method{join()} when appropriate.
To stop the server, call \function{stopListening()}. To stop the server, call \function{stopListening()}. To send a configuration
to the socket, read in the configuration file and send it to the socket
as a string of bytes preceded by a four-byte length packed in binary using
struct.\code{pack(">L", n)}.
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{stopListening}{} \begin{funcdesc}{stopListening}{}

View File

@ -225,9 +225,9 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
""" """
Handle a request. Handle a request.
Each request is expected to be a 4-byte length, Each request is expected to be a 4-byte length, packed using
followed by the config file. Uses fileConfig() to do the struct.pack(">L", n), followed by the config file.
grunt work. Uses fileConfig() to do the grunt work.
""" """
import tempfile import tempfile
try: try: