コード例 #1
0
ファイル: Monitor.cs プロジェクト: SteamDatabase/SteamMonitor
        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);
        }
コード例 #2
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 );
        }
コード例 #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);
        }