network programming and sockets shutdown(stops the serve_forever(loop the following attributes give some basic information about the configuration of running servers requesthandlerclass the user-provided request handler class that was passed to the server constructor server_address the address on which the server is listeningsuch as the tuple ( ' socket the socket object being used for incoming requests here is an example of running the timehandler as tcp serverfrom socketserver import tcpserver serv tcpserver(('', ,timehandlerserv serve_forever(here is an example of running the handler as udp serverfrom socketserver import udpserver serv udpserver(('', ,timehandlerserv serve_forever( key aspect of the socketserver module is that handlers are decoupled from servers that isonce you have written handleryou can plug it into many different kinds of servers without having to change its implementation defining customized servers servers often need special configuration to account for different network address familiestimeoutsconcurrencyand other features this customization is carried out by inheriting from one of the four basic servers described in the previous section the following class attributes can be defined to customize basic settings of the underlying network socketserver address_family the address family used by the server socket the default value is socket af_inet use socket af_inet if you want to use ipv server allow_reuse_address boolean flag that indicates whether or not socket should reuse an address this is useful when you want to immediately restart server on the same port after program has terminated (otherwiseyou have to wait few minutesthe default value is false server request_queue_size the size of the request queue that' passed to the socket' listen(method the default value is lib fl ff