Exemplo n.º 1
0
 public void OnEnable()
 {
     m_ServerListResponse = new ISteamMatchmakingServerListResponse(OnServerResponded, OnServerFailedToRespond, OnRefreshComplete);
     m_PingResponse       = new ISteamMatchmakingPingResponse(OnServerRespondedPing, OnServerFailedToRespondPing);
     m_PlayersResponse    = new ISteamMatchmakingPlayersResponse(OnAddPlayerToList, OnPlayersFailedToRespond, OnPlayersRefreshComplete);
     m_RulesResponse      = new ISteamMatchmakingRulesResponse(OnRulesResponded, OnRulesFailedToRespond, OnRulesRefreshComplete);
 }
    public void OnEnable()
    {
        m_ServerListRequest = HServerListRequest.Invalid;
        m_ServerQuery       = HServerQuery.Invalid;

        m_ServerListResponse = new ISteamMatchmakingServerListResponse(OnServerResponded, OnServerFailedToRespond, OnRefreshComplete);
        m_PingResponse       = new ISteamMatchmakingPingResponse(OnServerResponded, OnServerFailedToRespond);
        m_PlayersResponse    = new ISteamMatchmakingPlayersResponse(OnAddPlayerToList, OnPlayersFailedToRespond, OnPlayersRefreshComplete);
        m_RulesResponse      = new ISteamMatchmakingRulesResponse(OnRulesResponded, OnRulesFailedToRespond, OnRulesRefreshComplete);
    }
Exemplo n.º 3
0
        public void RefreshHistoryServers()
        {
            ReleaseRequest();
            searchType = SearchType.History;

            if (m_ServerListResponse == null)
            {
                m_ServerListResponse = new ISteamMatchmakingServerListResponse(OnServerResponded, OnServerFailedToRespond, OnRefreshComplete);
            }

            m_ServerListRequest = SteamMatchmakingServers.RequestHistoryServerList(steamSettings.applicationId, filter.ToArray(), System.Convert.ToUInt32(filter.Count), m_ServerListResponse);
        }
Exemplo n.º 4
0
        public void RefreshLANServers()
        {
            ReleaseRequest();
            searchType = SearchType.LAN;

            if (m_ServerListResponse == null)
            {
                m_ServerListResponse = new ISteamMatchmakingServerListResponse(OnServerResponded, OnServerFailedToRespond, OnRefreshComplete);
            }

            m_ServerListRequest = SteamMatchmakingServers.RequestLANServerList(steamSettings.applicationId, m_ServerListResponse);
        }
Exemplo n.º 5
0
        public void Request(RequestType type, ResponseDelegate onResponse)
        {
            if (!SteamService.IsInitialized)
            {
                return;
            }

            if (_responder == null)
            {
                _responder = new ISteamMatchmakingServerListResponse(OnResponded, OnFailedToRespond, OnRefreshComplete);
            }

            CancelRequest();

            _onResponse = onResponse;

            var  filters     = _filters.ToArray();
            uint filterCount = (uint)_filters.Count;

            var appid = SteamService.SteamAppid;

            switch (type)
            {
            case RequestType.Favourites:
                _handle = SteamMatchmakingServers.RequestFavoritesServerList(appid, filters, filterCount, _responder);
                break;

            case RequestType.Friends:
                _handle = SteamMatchmakingServers.RequestFriendsServerList(appid, filters, filterCount, _responder);
                break;

            case RequestType.History:
                _handle = SteamMatchmakingServers.RequestHistoryServerList(appid, filters, filterCount, _responder);
                break;

            case RequestType.Internet:
                _handle = SteamMatchmakingServers.RequestInternetServerList(appid, filters, filterCount, _responder);
                break;

            case RequestType.LAN:
                _handle = SteamMatchmakingServers.RequestLANServerList(appid, _responder);
                break;
            }
        }
Exemplo n.º 6
0
 public ServerBrowser(ISteamSession session)
 {
     _session             = session;
     _mServerListResponse = new ISteamMatchmakingServerListResponse(OnServerResponded,
                                                                    OnServerFailedToRespond, OnRefreshComplete);
 }
Exemplo n.º 7
0
 public override uint RequestSpectatorServerList(uint iApp,MatchMakingKeyValuePair_t  [] ppchFilters,ISteamMatchmakingServerListResponse pRequestServersResponse)
 {
     CheckIfUsable();
     uint result = NativeEntrypoints.SteamAPI_ISteamMatchmakingServers_RequestSpectatorServerList(m_pSteamMatchmakingServers,iApp,ppchFilters,(uint) ppchFilters.Length,pRequestServersResponse.GetIntPtr());
     return result;
 }
Exemplo n.º 8
0
 public override uint RequestLANServerList(uint iApp,ISteamMatchmakingServerListResponse pRequestServersResponse)
 {
     CheckIfUsable();
     uint result = NativeEntrypoints.SteamAPI_ISteamMatchmakingServers_RequestLANServerList(m_pSteamMatchmakingServers,iApp,pRequestServersResponse.GetIntPtr());
     return result;
 }
Exemplo n.º 9
0
 public abstract uint RequestSpectatorServerList(uint iApp,MatchMakingKeyValuePair_t  [] ppchFilters,ISteamMatchmakingServerListResponse pRequestServersResponse);
Exemplo n.º 10
0
 public abstract uint RequestLANServerList(uint iApp,ISteamMatchmakingServerListResponse pRequestServersResponse);
Exemplo n.º 11
0
 public abstract uint RequestSpectatorServerList(uint iApp,IntPtr [] ppchFilters,ISteamMatchmakingServerListResponse pRequestServersResponse);