As a Host: Our dog is small, clean, and very friendly. He doesn't jump up, but he does sometimes lick (not too excessively). When people are visiting our house, we do not banish him from the room, but I do watch guests carefully for their reaction to him, and usually they give off initial warning signs that they are uncomfortable (moving a hand/foot away from him if he is close etc), and in that case, I consider it a part of my hosting duties to remove the source of discomfort. Usually this is a redirect -- I have him sit with me, and I lightly restrain him, or remind him about his favorite toy over on his bed, or if desperate, we have always-distracting chew toys.
As a guest: I guess I have always felt comfortable telling a friend's dog "No" (not shouting, but sharply) for personal space violations like jumping or licking. If insufficient, I have removed their paws (gently but firmly - grasping and setting down, never impacting, no matter how "lightly") or pushed their faces away. When my friends had puppies, I also have been the first to notice a potty need and swiftly moved them outside without alerting the owner/waiting for them to do it, since time is of the essence there.
At friends' houses where I spend a lot of time, I do invest a little in a relationship with the dog. One of my friends has an over-eager-to-please/get-attention dog, and so I do give her easy commands (ie sit) and employ conservative/irreproachable dog training techniques such as praise/pats for good, and ignore/turn away for bad. I find that establishing myself as higher in the pack than the dog (I give commands to be followed), and give them attention on MY terms makes the rest of the visit(s) more pleasant.