I read in one of my BDSM research that the British navy was quite intolerant to homosexuals because homosexuality cases were quite common among sailors. The officers were rarely punished for the offense, coming from the British elite, the officers could keep shallow clerk and sailors under his command to satisfy their "needs".
However, the sailors who were caught or accused of sodomy were severely punished. The most common punishment was that I illustrated in this drawing. The two accused, completely naked in front of the entire crew, have to whipping each other, several times. The caning had to hurt mainly the areas of "sin."
I'm sure the officers had delight in watching such punishments. The text informs that the punishment stretched for several days, forcing the caught couple work completely naked for weeks, as a form of humiliation, bearing marks of the whip in the body.
Who likes the thing has no doubt that the officers who invented such practices were more perverted than the miserable caught.