#NEWLINE# def create_accept_socket( self ) : #NEWLINE# #INDENT# " Create a socket and setup 'accept' handler " #NEWLINE# listen_sock = socket . socket ( ) #NEWLINE# listen_sock . setblocking ( 0 ) #NEWLINE# listen_sock . bind ( ( 'localhost' , 0 ) ) #NEWLINE# listen_sock . listen ( 1 ) #NEWLINE# fd_ = self . save_sock ( listen_sock ) #NEWLINE# self . listen_addr = listen_sock . getsockname ( ) #NEWLINE# self . ioloop . add_handler ( self , self . do_accept , READ )