-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathCommunicatingState.cs
More file actions
22 lines (18 loc) · 929 Bytes
/
CommunicatingState.cs
File metadata and controls
22 lines (18 loc) · 929 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System.Threading.Tasks;
using NitroxClient.Communication.Abstract;
namespace NitroxClient.Communication.MultiplayerSession.ConnectionState
{
public abstract class CommunicatingState : IMultiplayerSessionConnectionState
{
public abstract MultiplayerSessionConnectionStage CurrentStage { get; }
public abstract Task NegotiateReservationAsync(IMultiplayerSessionConnectionContext sessionConnectionContext);
public abstract void JoinSession(IMultiplayerSessionConnectionContext sessionConnectionContext);
public virtual void Disconnect(IMultiplayerSessionConnectionContext sessionConnectionContext)
{
sessionConnectionContext.ClearSessionState();
sessionConnectionContext.Client.Stop();
Disconnected newConnectionState = new Disconnected();
sessionConnectionContext.UpdateConnectionState(newConnectionState);
}
}
}