I've been trying to minimize playing in these situations. The most egregious are the ones that bubble over with enthusiasm blurting out "oh I haven't seen you in such a long time, can you play for me, please, please, please..." Fifteen seconds into the music, they start loudly yaking to other people in the room, not about the music, but anything else "oh did you watch the game last night?" When the music ends they blurt out "That was lovely. Can you play another, please, please, please. Can you play Canon in ***** please, I think that is the most beautiful piece ever." The cycle starts again... They request a piece and still don't have the attention span to listen to their own request.
It is one thing if it is a paid lounge gig where such interruptions are part of the job, but it is not - such function usually takes place at a family members home, or even my home. I used to play through the noise, however, I have been considering other options that do not encourage such despicable behaviour. Maybe engaging with the person that made the request, and asking what they thought about the music after playing it. After all, if a person makes a request there is a reasonable expectation that they are prepared to reciprocate by listening to the thing they ask for. If the people are being particularly disrespectful, I would be inclined to unceremoniously stop playing and walk away.
IMO in social gatherings play for the people that are genuinely interested, the ones that are willing to invest their ears towards their request. Never let people take your playing for granted.