def _find_process_name(port_number):
 for connection in psutil.net_connections():
  if (connection.laddr[1] == port_number):
   return psutil.Process(connection.pid).name()
 return None

def _find_process_name ( port_number ) : for connection in psutil . net_connections ( ) : if ( connection . laddr [ 1 ] == port_number ) : return psutil . Process ( connection . pid ) . name ( ) return None
get the name of the process using the given port number .