#NEWLINE# @ staticmethod #NEWLINE# def _get_tcp_ipv6_sockets( ) : #NEWLINE# #INDENT# size = ctypes . c_uint ( 0 ) #NEWLINE# try : #NEWLINE# #INDENT# winproxy . GetExtendedTcpTable ( None , ctypes . byref ( buffer ) , ulAf = AF_INET6 ) #NEWLINE# #UNINDENT# except winproxy . IphlpapiError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# buffer = ( ctypes . c_char * size . value ) ( ) #NEWLINE# winproxy . GetExtendedTcpTable ( buffer , ctypes . byref ( size ) , ulAf = AF_INET6 ) #NEWLINE# t = get_MIB_TCP6TABLE_OWNER_PID_from_buffer ( buffer ) #NEWLINE# return list ( t . table )