34 lines
788 B
C#
34 lines
788 B
C#
using System.Collections.Concurrent;
|
|
using System.Diagnostics;
|
|
using System.Numerics;
|
|
using mmo.shared.networking;
|
|
using LiteNetLib;
|
|
using LiteNetLib.Utils;
|
|
using mmo.shared.networking.DTO;
|
|
using mmo.shared.networking.MessageTypes;
|
|
using mmo.shared.networking.Opcodes;
|
|
using Riptide;
|
|
using Riptide.Utils;
|
|
|
|
public class NetworkManager
|
|
{
|
|
private readonly Server _serverInstance = new Server();
|
|
public bool IsRunning => _serverInstance.IsRunning;
|
|
|
|
public void Initialize()
|
|
{
|
|
RiptideLogger.Initialize(Console.WriteLine, Console.WriteLine, Console.WriteLine, Console.WriteLine, true);
|
|
}
|
|
|
|
public void RunServer()
|
|
{
|
|
_serverInstance.Start(9050, 250);
|
|
}
|
|
|
|
public void ServerTick()
|
|
{
|
|
_serverInstance.Update();
|
|
}
|
|
|
|
|
|
} |