]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Documentation clarified re. config socket listener protocol
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 5 Jun 2005 20:39:36 +0000 (20:39 +0000)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Sun, 5 Jun 2005 20:39:36 +0000 (20:39 +0000)
Doc/lib/liblogging.tex
Lib/logging/config.py

index 8146059cceb7bdf8d0d6655c4b1d447fb7f54422..cca83ca501be2d115387ad073463e5795697cc13 100644 (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()}.
 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 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}
 
 \begin{funcdesc}{stopListening}{}
index ea157db5bfc5b7bd08b916667438e5722bfbd8e6..22132b1676890edc084d77eccc4d5a5975740961 100644 (file)
@@ -225,9 +225,9 @@ def listen(port=DEFAULT_LOGGING_CONFIG_PORT):
             """
             Handle a request.
 
-            Each request is expected to be a 4-byte length,
-            followed by the config file. Uses fileConfig() to do the
-            grunt work.
+            Each request is expected to be a 4-byte length, packed using
+            struct.pack(">L", n), followed by the config file.
+            Uses fileConfig() to do the grunt work.
             """
             import tempfile
             try: