#NEWLINE# @ classmethod #NEWLINE# def _start_server( cls , socket_handler ) : #NEWLINE# #INDENT# ready_event = threading . Event ( ) #NEWLINE# cls . server_thread = SocketServerThread ( socket_handler = socket_handler , ready_event = ready_event , host = cls . host ) #NEWLINE# cls . server_thread . start ( ) #NEWLINE# ready_event . wait ( 5 ) #NEWLINE# if ( not ready_event . is_set ( ) ) : #NEWLINE# #INDENT# raise Exception ( 'most likely failed to start server' ) #NEWLINE# #UNINDENT# cls . port = cls . server_thread . port