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
{
28
Timeout
=
TimeoutThreshold
;
29
}
30
}
Barotrauma.Networking.NetworkConnection.Endpoint
new T Endpoint
Definition:
NetworkConnection.cs:15
Barotrauma.Networking.NetworkConnection.NetworkConnection
NetworkConnection(T endpoint)
Definition:
NetworkConnection.cs:13
Barotrauma.Networking.NetworkConnection.TimeoutThreshold
static double TimeoutThreshold
Definition:
NetworkConnection.cs:20
P2PConnection
Definition:
P2PConnection.cs:6
P2PConnection.P2PConnection
P2PConnection(T endpoint)
Definition:
P2PConnection.cs:7
P2PConnection.P2PConnection
P2PConnection(P2PEndpoint endpoint)
Definition:
P2PConnection.cs:14
P2PConnection.Decay
void Decay(float deltaTime)
Definition:
P2PConnection.cs:21
P2PConnection< SteamP2PEndpoint >::Timeout
double Timeout
Definition:
P2PConnection.cs:19
P2PConnection< SteamP2PEndpoint >::Heartbeat
void Heartbeat()
Definition:
P2PConnection.cs:26
P2PEndpoint
Definition:
P2PEndpoint.cs:5
Barotrauma.Networking
Definition:
LuaBarotraumaAdditions.cs:9
Barotrauma
BarotraumaShared
SharedSource
Networking
Primitives
NetworkConnection
P2PConnection.cs
Generated by
1.9.1