public void ServerHolepunch(ProudServer server, ProudSession session, ServerHolepunchMessage message) { session.Logger?.Debug("ServerHolepunch={@Message}", message); if (session.P2PGroup == null || !_server.UdpSocketManager.IsRunning || session.HolepunchMagicNumber != message.MagicNumber) { return; } session.SendUdpAsync(new ServerHolepunchAckMessage(session.HolepunchMagicNumber, session.UdpEndPoint)); }
public void NotifyHolepunchSuccess(ProudServer server, ProudSession session, ServerHolepunchMessage message) { if (session.P2PGroup == null || !_server.UdpSocketManager.IsRunning || session.HolepunchMagicNumber != message.MagicNumber) { return; } //Logger<>.Debug($"Client:{session.HostId} - Server holepunch success(EndPoint:{message.EndPoint} LocalEndPoint:{message.LocalEndPoint})"); session.SendUdpAsync(new ServerHolepunchAckMessage(session.HolepunchMagicNumber, session.UdpEndPoint)); }