wip
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
namespace Ragon.Server;
|
||||
|
||||
public interface INetworkChannel
|
||||
{
|
||||
void Send(byte[] data);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Ragon.Server;
|
||||
|
||||
public interface INetworkConnection
|
||||
{
|
||||
public ushort Id { get; }
|
||||
public INetworkChannel ReliableChannel { get; }
|
||||
public INetworkChannel UnreliableChannel { get; }
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Ragon.Server;
|
||||
|
||||
public interface INetworkListener
|
||||
{
|
||||
void OnConnected(INetworkConnection connection);
|
||||
void OnDisconnected(INetworkConnection connection);
|
||||
void OnTimeout(INetworkConnection connection);
|
||||
void OnData(INetworkConnection connection, byte[] data);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Ragon.Server;
|
||||
|
||||
public interface INetworkServer
|
||||
{
|
||||
public void Stop();
|
||||
public void Poll();
|
||||
public void Start(INetworkListener listener, NetworkConfiguration configuration);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Ragon.Server;
|
||||
|
||||
public struct NetworkConfiguration
|
||||
{
|
||||
public int LimitConnections { get; set; }
|
||||
public int Port { get; set; }
|
||||
public uint Protocol { get; set; }
|
||||
public string Address { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Ragon.Protocol\Ragon.Protocol.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user