It doesn't.

If you only want to make a software single-instance, you typically simply use a named mutex on Windows.

In general it only requires *a way* of communicating *some* information, not to "fully control" the other process or to have a port open.

What was abused in the Telegram hack is a hidden feature that shouldn't have existed, and it was even only vulnerable because of a lack of escaping.