Share via

PeerNameRegistration

Moukonga 1 Reputation point
2021-04-26T10:20:09.303+00:00

endpoint collection is empty after registrering a unsecured peername.
I m using net5.0 sdk and targeting .net462

    static List<PeerNameRegistration> getPeerNameRegs (string peername, int port) {
        List<PeerNameRegistration> regs = new List<PeerNameRegistration>();
        var clouds = Cloud.GetAvailableClouds();
        var peer = new PeerName(peername, PeerNameType.Unsecured);
        foreach (var cloud in clouds) {
            var reg = new PeerNameRegistration(peer, port, cloud);
            reg.Start();
            regs.Add(reg);
            Console.WriteLine($"  --- {reg.EndPointCollection.Count}.");
        }
        return regs;
    }

each reg.EndPointCollection is empty (reg.EndPointCollection = 0);

Developer technologies | .NET | .NET Runtime
Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.