The easiest way I know how to set a boundary with a wayward wife is to mess with her primary concern...her affair partner.
"Honey, if you won't respect my boundary of not communicating with OM in our family home in front of either our son or me, I'll call OM and ask him to respect my boundary. What's his phone number again? Maybe he'll know what's good for him"
Another alternative...
Plop yourself right down next to her and say "what ya texting?"..."who ya texting?". She's trying to have a private conversation with her OM and you are interfering. She'll learn not to do it around you if she intends to keep having those conversations. Last thing she wants is you sticking to her like glue chatting her up while OM is awaiting the next hugely important text response "Noooo, I love YOUUUUU more".
The typical wayward wife does not want OM to be bothered or hassled at all. She wants to present herself to him as a sane rational kind woman so it's difficult for her to go all ballistic on you while talking to him and trying to maintain a mutually pleasant conversation. IF she does take her focus off OM and on to going nuts on you....you've succeeded in ending THAT conversation for the time being. Plus, your detached so it's no skin off your back. She'll learn.
Lastly, if your son is aware of the situation (which he should be in an age appropriate manner ~~~~ i.e. - mommy has a boyfriend, his name is xyz, mommy's are not supposed to have boyfriends other than their husband and I am doing everything I can to save your mother from making the biggest mistake of her life, but your mother is not my prisoner. She has free will to do as she chooses but no that I don't want this at all. I love you and want what's best for you and for now and willing to forgive your mother. She's not interested today. I know you've seen some stuff and you need to know that this all has nothing to do with you. But if our marriage doesn't make it you will at least be warned about the man that is, in part, responsible) then the consequences of your wife violating your boundary is to tell your wife if she does it again you will be asking your son if HE thinks it's ok for her to be talking to her boyfriend in OUR (mom, dad and sons) home.
Finally....again, be prepared for an attempt by her to have you arrested or otherwise thrown out of the house. Or...leaving and taking your son with her.
The internet is 90% complaining and entitlement and I hate it because I deserve better!