first commit
This commit is contained in:
19
NitroxClient/Communication/Abstract/IClient.cs
Normal file
19
NitroxClient/Communication/Abstract/IClient.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Threading.Tasks;
|
||||
using NitroxModel.Packets;
|
||||
|
||||
namespace NitroxClient.Communication.Abstract
|
||||
{
|
||||
/// <summary>
|
||||
/// Abstracted IClient in order to give us options in the underlying protocol that we use to communicate with the server.
|
||||
/// Ex: We may want to also roll a UDP client in the future to handle packets where we don't necessarily care
|
||||
/// about transmission order or error recovery.
|
||||
/// </summary>
|
||||
public interface IClient
|
||||
{
|
||||
bool IsConnected { get; }
|
||||
Task StartAsync(string ipAddress, int serverPort);
|
||||
void Stop();
|
||||
void PollEvents();
|
||||
void Send(Packet packet);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user