in the Middle Ages the port building that had customs functions and where port transactions took place