ServerApplication

It can be used to create entry point of server application

namespace FigNet.Core
{
    public interface IServer
    {
        bool AddCommand(string id, Action procedure);
        void AddModule(IModule module);
        bool ContainsModule(IModule module);
        bool ExecuteCommand(string id);
        List<string> ListCommands();
        T GetModule<T>() where T : class, IModule;
        IPeer GetPeer(uint peerId);
        bool InitializeModules();
        void Process(float deltaTime);
        void SetUp();
        void TearDown();
    }
}
namespace FigNet.Server
{
    public class ServerApplication : IServer
    {
        public ServerApplication();

        public bool AddCommand(string id, Action procedure);
        // it also call Load function of added module
        public void AddModule(IModule module);
        public bool ContainsModule(IModule module);
        public bool ExecuteCommand(string id);
        public List<string> ListCommands();
        public IPeer GetPeer(uint peerId);
        public bool InitializeModules();
        public void Process(float deltaTime);
        public void SetUp();
        public void TearDown();
    }
}

In Unity SDK this class is named as ServerManager.cs

Last updated

Was this helpful?