Esempio n. 1
0
        public Monitor(DatabaseRecord server, SteamConfiguration config)
        {
            Server = server;

            Client = new SteamClient(config);

            steamUser = new SteamMonitorUser();
            Client.AddHandler(steamUser);

            callbackMgr = new CallbackManager(Client);
            callbackMgr.Subscribe <SteamClient.ConnectedCallback>(OnConnected);
            callbackMgr.Subscribe <SteamClient.DisconnectedCallback>(OnDisconnected);
            callbackMgr.Subscribe <SteamUser.LoggedOnCallback>(OnLoggedOn);
            callbackMgr.Subscribe <SteamUser.LoggedOffCallback>(OnLoggedOff);
        }
        public BaseMonitor( IPEndPoint server )
        {
            Server = server;

            Client = new SteamClient();

            steamUser = new SteamMonitorUser();
            Client.AddHandler( steamUser );

            callbackMgr = new CallbackManager( Client );

            new Callback<SteamClient.ConnectedCallback>( OnConnected, callbackMgr );
            new Callback<SteamClient.DisconnectedCallback>( OnDisconnected, callbackMgr );

            new Callback<SteamUser.LoggedOnCallback>( OnLoggedOn, callbackMgr );
            new Callback<SteamUser.LoggedOffCallback>( OnLoggedOff, callbackMgr );

            new Callback<SteamClient.CMListCallback>( OnCMList, callbackMgr );
        }
Esempio n. 3
0
        public BaseMonitor(IPEndPoint server)
        {
            Server = server;

            Client = new SteamClient();

            steamUser = new SteamMonitorUser();
            Client.AddHandler(steamUser);

            callbackMgr = new CallbackManager(Client);

            new Callback <SteamClient.ConnectedCallback>(OnConnected, callbackMgr);
            new Callback <SteamClient.DisconnectedCallback>(OnDisconnected, callbackMgr);

            new Callback <SteamUser.LoggedOnCallback>(OnLoggedOn, callbackMgr);
            new Callback <SteamUser.LoggedOffCallback>(OnLoggedOff, callbackMgr);

            new Callback <SteamClient.CMListCallback>(OnCMList, callbackMgr);
        }