Stall for time. Figure out your options. Each situation is different. Decide if you will fight, try to talk your way out of the assault, scream, or, if necessary for your survival, submit.
If you fight, hit hard and fast. Target the eyes and groin.
Try to dissuade the attacker from continuing. Tell him you have a sexually transmitted disease, tell him you are menstruating, urinate, vomit, or do anything to discourage the attacker.