protected void OnPCPOleh(Atom atom) { var rip = atom.Children.GetHeloRemoteIP(); if (rip != null) { var global_addr = PeerCast.GetGlobalAddress(rip.AddressFamily); if (global_addr == null || global_addr.GetAddressLocality() <= rip.GetAddressLocality()) { PeerCast.SetGlobalAddress(rip); } } var port = atom.Children.GetHeloPort(); if (port.HasValue) { PeerCast.SetPortStatus(rip.AddressFamily, port.Value != 0 ? PortStatus.Open : PortStatus.Firewalled); } var sid = atom.Children.GetHeloSessionID(); if (sid.HasValue) { var host = new HostBuilder(); host.SessionID = sid.Value; host.GlobalEndPoint = connection.RemoteEndPoint; uphost = host.ToHost(); } }