Skip to content

Commit

Permalink
Add missing server class attributes to socketserver docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-hansen committed Dec 28, 2024
1 parent f9a5a3a commit a55bfff
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions Doc/library/socketserver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,6 @@ Server Objects
Clean up the server. May be overridden.


.. attribute:: address_family

The family of protocols to which the server's socket belongs.
Common examples are :const:`socket.AF_INET` and :const:`socket.AF_UNIX`.


.. attribute:: RequestHandlerClass

The user-provided request handler class; an instance of this class is created
Expand All @@ -294,14 +288,35 @@ Server Objects

.. XXX should class variables be covered before instance variables, or vice versa?
.. attribute:: address_family

The family of protocols to which the server's socket belongs.
Common examples are :const:`socket.AF_INET` and :const:`socket.AF_UNIX`.


.. attribute:: allow_reuse_address

Whether the server will allow the reuse of an address. This defaults to
:const:`False`, and can be set in subclasses to change the policy.


.. attribute:: allow_reuse_port

Whether the server will allow the reuse of a port. This defaults to
:const:`False`, and can be set in subclasses to change the policy.

.. attribute:: max_packet_size

Only for datagram sockets, e.g. UDP.
The maximum amount of data (in bytes) to receive at once. If a packet is
too large for the buffer, then the excess bytes beyond :attr:`max_packet_size`
are discarded. The default value is usually 8192, but this can be
overridden by subclasses.


.. attribute:: request_queue_size

Only for stream sockets, e.g. TCP.
The size of the request queue. If it takes a long time to process a single
request, any requests that arrive while the server is busy are placed into a
queue, up to :attr:`request_queue_size` requests. Once the queue is full,
Expand Down

0 comments on commit a55bfff

Please sign in to comment.