Exemple #1
0
        public static SteamConfigurationState CreateDefaultState()
        {
            return(new SteamConfigurationState
            {
                AllowDirectoryFetch = true,

                ConnectionTimeout = TimeSpan.FromSeconds(5),

                DefaultPersonaStateFlags =
                    EClientPersonaStateFlag.PlayerName | EClientPersonaStateFlag.Presence |
                    EClientPersonaStateFlag.SourceID | EClientPersonaStateFlag.GameExtraInfo |
                    EClientPersonaStateFlag.LastSeen,

                HttpClientFactory = DefaultHttpClientFactory,

                MachineInfoProvider = MachineInfoProvider.GetDefaultProvider(),

                ProtocolTypes = ProtocolTypes.Tcp,

                ServerListProvider = new MemoryServerListProvider(),

                Universe = EUniverse.Public,

                WebAPIBaseAddress = WebAPI.DefaultBaseAddress
            });
        }
Exemple #2
0
        static MachineID GenerateMachineID()
        {
            // the aug 25th 2015 CM update made well-formed machine MessageObjects required for logon
            // this was flipped off shortly after the update rolled out, likely due to linux steamclients running on distros without a way to build a machineid
            // so while a valid MO isn't currently (as of aug 25th) required, they could be in the future and we'll abide by The Valve Law now

            var machineId = new MachineID();

            MachineInfoProvider provider = MachineInfoProvider.GetProvider();

            machineId.SetBB3(GetHexString(provider.GetMachineGuid()));
            machineId.SetFF2(GetHexString(provider.GetMacAddress()));
            machineId.Set3B3(GetHexString(provider.GetDiskId()));

            // 333 is some sort of user supplied data and is currently unused

            return(machineId);
        }