Client LuaCsForBarotrauma
P2PConnection.cs
1 #nullable enable
2 
3 namespace Barotrauma.Networking;
4 
5 abstract class P2PConnection<T> : P2PConnection where T : P2PEndpoint
6 {
7  protected P2PConnection(T endpoint) : base(endpoint) { }
8 
9  public new T Endpoint => (base.Endpoint as T)!;
10 }
11 
12 abstract class P2PConnection : NetworkConnection<P2PEndpoint>
13 {
14  protected P2PConnection(P2PEndpoint endpoint) : base(endpoint)
15  {
16  Heartbeat();
17  }
18 
19  public double Timeout = 0.0;
20 
21  public void Decay(float deltaTime)
22  {
23  Timeout -= deltaTime;
24  }
25 
26  public void Heartbeat()
27  {
29  }
30 }
P2PConnection(T endpoint)
Definition: P2PConnection.cs:7
P2PConnection(P2PEndpoint endpoint)
void Decay(float deltaTime)