Esempio n. 1
0
        /// <summary>
        /// Initialize plugin api calls listen server
        /// </summary>
        /// <returns>Plugin api calls server</returns>
        public Server InitServer()
        {
            var server = new Server();

            server.Services.Add(Plugin.BindService(new ChatBotPlugin()));
            var listenHost = Listen.Split(':')[0];
            var listenPort = int.Parse(Listen.Split(':')[1]);

            server.Ports.Add(new ServerPort(listenHost, listenPort, ServerCredentials.Insecure));
            server.Start();
            return(server);
        }