Beispiel #1
0
        /// <summary>
        /// StartServer
        /// </summary>
        public void StartServer()
        {
            try
            {
                m_server = new Grpc.Core.Server
                {
                    Services =
                    {
                        PlayerService.BindService(PlayerGrpcService),
                        ColorService.BindService(ColorGrpcService)
                    },
                    Ports =
                    {
                        new ServerPort(m_host, m_port, ServerCredentials.Insecure)
                    }
                };

                m_server.Start();
            }
            catch (Exception e)
            {
                throw;
            }
        }