Giving a tcp socket a name

I am working on localhost network discovery with powershell. I am using this command

Get-NetTCPConnection -State Listen | Select-Object -Property *,@{'Name' = 'ProcessName';'Expression'={(Get-Process -Id $_.OwningProcess).Name}} | where-object ProcessName -match "..." <- where … is a process name

One of the outputs is ‘Name’. Is this the name of the socket? Whether it is or not, is it possible to give a socket a descriptive name, like ‘My TCP Server’?

I am working on a piece of code that needs to discover the port another piece of software is listening to on the localhost. The other software announces itself over Bonjour. Due to Apple licensing, I want to find another way to discover the port. A nice predictable descriptive name would solve the problem.

Also note that I have access to the source code of the other software and can make the necessary adjustments to give the socket a name if that is possible.