Esempio n. 1
0
        public RpcManager(RpcSteamListener steamListener, IConfiguration configuration)
        {
            var grpcServer = configuration.GetSection("Grpc").GetSection("SteamBots").GetSection("Client");

            var serverHost = grpcServer.GetSection("Host").Value;
            var serverPort = int.Parse(grpcServer.GetSection("Port").Value);

            _server = new Server
            {
                Services = { StatusChanged.BindService(steamListener) },
                Ports    = { new ServerPort(serverHost, serverPort, ServerCredentials.Insecure) }
            };
        }