17 lines
		
	
	
		
			456 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			456 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using LiteNetLib;
 | 
						|
 | 
						|
namespace Engine.Systems.Network;
 | 
						|
 | 
						|
public record class LiteNetLibClientConnection(NetPeer NetPeer) : IConnection
 | 
						|
{
 | 
						|
    public string Id { get; } = NetPeer.Id.ToString();
 | 
						|
 | 
						|
    public float Ping => NetPeer.Ping * .001f;
 | 
						|
    public float RoundTrip => NetPeer.RoundTripTime * .001f;
 | 
						|
 | 
						|
    public int PingMs => NetPeer.Ping;
 | 
						|
    public int RoundTripMs => NetPeer.RoundTripTime;
 | 
						|
 | 
						|
    public override string ToString() => $"Connection({Id})";
 | 
						|
}
 |