public static MessageServer InitServer(int port = 3033)
        {
            MessageServer appServer  = new MessageServer();
            var           listenners = new List <IListenerConfig>();

            listenners.Add(new ListenerConfig()
            {
                Ip = "IPv6Any", Port = port
            });
            listenners.Add(new ListenerConfig()
            {
                Ip = "Any", Port = port
            });

            ServerConfig config = new ServerConfig()
            {
                Listeners = listenners
            };

            if (!appServer.Setup(config)) //Setup with listening port
            {
                throw new Exception("Failed to setup!");
            }
            if (!appServer.Start())
            {
                throw new Exception("Failed to start!");
            }
            return(appServer);
        }
 internal void Close()
 {
     if (appServer != null)
     {
         appServer.Stop();
         appServer = null;
     }
 }
 internal void Start()
 {
     appServer = MessageServer.InitServer();
 }