#NEWLINE# def _create_server_sockets( self ) : #NEWLINE# #INDENT# sockets = [ ] #NEWLINE# for family in [ socket . AF_INET , socket . AF_INET6 ] : #NEWLINE# #INDENT# if ( ( family == socket . AF_INET6 ) and ( not self . ipv6 ) ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# local_server_socket = socket . socket ( family = family ) #NEWLINE# if ( family == socket . AF_INET6 ) : #NEWLINE# #INDENT# local_server_socket . setsockopt ( socket . IPPROTO_IPV6 , socket . IPV6_V6ONLY , 1 ) #NEWLINE# #UNINDENT# local_server_socket . setsockopt ( socket . SOL_SOCKET , socket . SO_REUSEADDR , 1 ) #NEWLINE# self . connection_class . setup_server_socket ( local_server_socket ) #NEWLINE# local_server_socket . bind ( ( '' , self . port ) ) #NEWLINE# local_server_socket . listen ( 5 ) #NEWLINE# sockets . append ( local_server_socket ) #NEWLINE# #UNINDENT# return sockets