feat: Network Interfaces
This commit is contained in:
parent
0e198afeab
commit
d4c57c0153
|
@ -0,0 +1,6 @@
|
|||
namespace Pong.Network;
|
||||
|
||||
public interface INetworkClient : INetworkCommunicator
|
||||
{
|
||||
void Connect(string address, int port, string? password = null);
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
using System;
|
||||
using LiteNetLib;
|
||||
using Syntriax.Engine.Core.Abstract;
|
||||
|
||||
namespace Pong.Network;
|
||||
|
||||
public interface INetworkCommunicator
|
||||
{
|
||||
EventBasedNetListener Listener { get; }
|
||||
NetManager Manager { get; }
|
||||
|
||||
void PollEvents();
|
||||
void Stop();
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
namespace Pong.Network;
|
||||
|
||||
public interface INetworkServer : INetworkCommunicator
|
||||
{
|
||||
string Password { get; }
|
||||
int MaxConnectionCount { get; }
|
||||
int Port { get; }
|
||||
|
||||
void Start(int port, int maxConnectionCount, string? password = null);
|
||||
}
|
Loading…
Reference in New Issue