#NEWLINE# @ classmethod #NEWLINE# def process_pp_v2( cls , sock , initial ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# data = cls . __read_pp_data ( sock , 16 , initial ) #NEWLINE# ( cmd , family , _ , addr_len ) = cls . __parse_pp_data ( data ) #NEWLINE# addr_data = cls . __read_pp_data ( sock , addr_len , b'' ) #NEWLINE# ret = cls . __parse_pp_addresses ( family , addr_data ) #NEWLINE# if ( cmd == 'local' ) : #NEWLINE# #INDENT# raise LocalConnection ( ) #NEWLINE# #UNINDENT# return ret #NEWLINE# #UNINDENT# except struct . error : #NEWLINE# #INDENT# raise AssertionError ( 'Invalid proxy protocol data' )