refactor: moved client and server interfaces into their files
This commit is contained in:
parent
8e314f3269
commit
6d159330a1
1
Engine.Serializers/YamlDotNet
Submodule
1
Engine.Serializers/YamlDotNet
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 62048d7abe5b233570d59c7d8043c21a4def2cb6
|
@ -16,22 +16,3 @@ public interface INetworkCommunicator
|
||||
INetworkCommunicator SubscribeToPackets<T>(Event<IConnection, T>.EventHandler callback);
|
||||
INetworkCommunicator UnsubscribeFromPackets<T>(Event<IConnection, T>.EventHandler callback);
|
||||
}
|
||||
|
||||
public interface INetworkCommunicatorClient : INetworkCommunicator
|
||||
{
|
||||
INetworkCommunicatorClient Connect(string address, int port, string? password = null);
|
||||
|
||||
INetworkCommunicatorClient SendToServer<T>(T packet, PacketDelivery packetDelivery = PacketDelivery.ReliableInOrder) where T : class, new();
|
||||
}
|
||||
|
||||
public interface INetworkCommunicatorServer : INetworkCommunicator
|
||||
{
|
||||
string Password { get; }
|
||||
int MaxConnectionCount { get; }
|
||||
int Port { get; }
|
||||
|
||||
INetworkCommunicatorServer Start(int port, int maxConnectionCount, string? password = null);
|
||||
|
||||
INetworkCommunicatorServer SendToClient<T>(IConnection connection, T packet, PacketDelivery packetDelivery = PacketDelivery.ReliableInOrder) where T : class, new();
|
||||
INetworkCommunicatorServer SendToAll<T>(T packet, PacketDelivery packetDelivery = PacketDelivery.ReliableInOrder) where T : class, new();
|
||||
}
|
||||
|
@ -0,0 +1,8 @@
|
||||
namespace Engine.Systems.Network;
|
||||
|
||||
public interface INetworkCommunicatorClient : INetworkCommunicator
|
||||
{
|
||||
INetworkCommunicatorClient Connect(string address, int port, string? password = null);
|
||||
|
||||
INetworkCommunicatorClient SendToServer<T>(T packet, PacketDelivery packetDelivery = PacketDelivery.ReliableInOrder) where T : class, new();
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
namespace Engine.Systems.Network;
|
||||
|
||||
public interface INetworkCommunicatorServer : INetworkCommunicator
|
||||
{
|
||||
string Password { get; }
|
||||
int MaxConnectionCount { get; }
|
||||
int Port { get; }
|
||||
|
||||
INetworkCommunicatorServer Start(int port, int maxConnectionCount, string? password = null);
|
||||
|
||||
INetworkCommunicatorServer SendToClient<T>(IConnection connection, T packet, PacketDelivery packetDelivery = PacketDelivery.ReliableInOrder) where T : class, new();
|
||||
INetworkCommunicatorServer SendToAll<T>(T packet, PacketDelivery packetDelivery = PacketDelivery.ReliableInOrder) where T : class, new();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user