Walmer Castle against Charles' brother, King James II, the townsfolk of Deal seized Walmer Castle on behalf of William III, the Prince of Orange. By the end of the century, however, the castle was increasingly regarded as out of date from a military perspective. In the 18th century, Walmer Castle became the official residence of the Lord Warden of the Cinque Ports. The Lord Warden was originally a medieval title linked to five key ports along the coast of England; the position's prominence had faded, but it still retained important judicial and military functions. When Lionel Sackville, the Duke of Dorset, was
Edward of Norwich, 2nd Duke of York he became a member of King Richard's council, and was with the king during a campaign in Ireland in 1394–5. Prior to that, although no patent has been found, he was created Earl of Cork. He used the styles of Rutland and Cork throughout the remainder of his life. In the late 1390s, Edward was sent on embassies to France and to the Count Palatine and was appointed to numerous offices, including Constable of Dover Castle, Lord Warden of the Cinque Ports, Keeper of the Channel Islands, Constable of the Tower, Warden of the New Forest, Keeper of Carisbrooke Castle