public ISteamMatchmakingServerListResponse(ISteamMatchmakingServerListResponse.ServerResponded onServerResponded, ISteamMatchmakingServerListResponse.ServerFailedToRespond onServerFailedToRespond, ISteamMatchmakingServerListResponse.RefreshComplete onRefreshComplete)
 {
     if (onServerResponded == null || onServerFailedToRespond == null || onRefreshComplete == null)
     {
         throw new ArgumentNullException();
     }
     this.m_ServerResponded = onServerResponded;
     this.m_ServerFailedToRespond = onServerFailedToRespond;
     this.m_RefreshComplete = onRefreshComplete;
     this.m_VTable = new ISteamMatchmakingServerListResponse.VTable
     {
         m_VTServerResponded = new ISteamMatchmakingServerListResponse.InternalServerResponded(this.InternalOnServerResponded),
         m_VTServerFailedToRespond = new ISteamMatchmakingServerListResponse.InternalServerFailedToRespond(this.InternalOnServerFailedToRespond),
         m_VTRefreshComplete = new ISteamMatchmakingServerListResponse.InternalRefreshComplete(this.InternalOnRefreshComplete)
     };
     this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ISteamMatchmakingServerListResponse.VTable)));
     Marshal.StructureToPtr(this.m_VTable, this.m_pVTable, false);
     this.m_pGCHandle = GCHandle.Alloc(this.m_pVTable, GCHandleType.Pinned);
 }
Beispiel #2
0
 public static HServerListRequest RequestInternetServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse)
 {
     InteropHelp.TestIfAvailableClient();
     return((HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestInternetServerList(iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse));
 }
		public static HServerListRequest RequestSpectatorServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) {
			InteropHelp.TestIfAvailableClient();
			return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestSpectatorServerList(iApp, new MMKVPMarshaller(ppchFilters), nFilters, (IntPtr)pRequestServersResponse);
		}
Beispiel #4
0
 public static HServerListRequest RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse)
 {
     InteropHelp.TestIfAvailableClient();
     return((HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestLANServerList(iApp, (IntPtr)pRequestServersResponse));
 }
Beispiel #5
0
 public HServerListRequest RefreshList(EServerList listType, MatchMakingKeyValuePair_t[] filters, ISteamMatchmakingServerListResponse response = null)
 {
     ISteamMatchmakingServerListResponse resp = new ISteamMatchmakingServerListResponse(SteamMatchmakingServerListResponse_ServerResponded, SteamMatchmakingServerListResponse_ServerFailedToResponded, (a, b) =>
     {
         SteamMatchmakingServerListResponse_OnRefreshComplete(a, b, listType);
     });
     if (response != null)
         resp = response;
     switch (listType)
     {
         case EServerList.Favorites:
             return SteamMatchmakingServers.RequestFavoritesServerList(SteamUtils.GetAppID(), filters, (uint)filters.Length, resp);
         case EServerList.Friends:
             return SteamMatchmakingServers.RequestFriendsServerList(SteamUtils.GetAppID(), filters, (uint)filters.Length, resp);
         case EServerList.History:
             return SteamMatchmakingServers.RequestHistoryServerList(SteamUtils.GetAppID(), filters, (uint)filters.Length, resp);
         case EServerList.Internet:
             return SteamMatchmakingServers.RequestInternetServerList(SteamUtils.GetAppID(), filters, (uint)filters.Length, resp);
         case EServerList.LAN:
             return SteamMatchmakingServers.RequestLANServerList(SteamUtils.GetAppID(), resp);
         case EServerList.Spectator:
             return SteamMatchmakingServers.RequestSpectatorServerList(SteamUtils.GetAppID(), filters, (uint)filters.Length, resp);
         default:
             throw new System.Exception("\"listType\" must not be unknown.");
     }
 }
		public static HServerListRequest RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse) {
			InteropHelp.TestIfAvailableClient();
			return (HServerListRequest)NativeMethods.ISteamMatchmakingServers_RequestLANServerList(iApp, (IntPtr)pRequestServersResponse);
		}
        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;
            }
        }
Beispiel #8
0
 public HServerListRequest RefreshList(EServerList listType, ISteamMatchmakingServerListResponse response = null)
 {
     return RefreshList(listType, new MatchMakingKeyValuePair_t[] { }, response);
 }
	public void OnEnable() {
		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);
	}
 public static HServerListRequest RequestHistoryServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) => default;   // 0x00000001807A4830-0x00000001807A4940
 public static HServerListRequest RequestSpectatorServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) => default; // 0x00000001807A4B10-0x00000001807A4C20
 public static HServerListRequest RequestInternetServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse) => default;  // 0x00000001807A4940-0x00000001807A4A50
 public static HServerListRequest RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse) => default;                                                               // 0x00000001807A4A50-0x00000001807A4B10
Beispiel #12
0
        public static HServerListRequest RequestSpectatorServerList(AppId_t iApp, MatchMakingKeyValuePair_t[] ppchFilters, uint nFilters, ISteamMatchmakingServerListResponse pRequestServersResponse)
        {
            HServerListRequest ret = new HServerListRequest();

            return(ret);
        }
Beispiel #13
0
        public static HServerListRequest RequestLANServerList(AppId_t iApp, ISteamMatchmakingServerListResponse pRequestServersResponse)
        {
            HServerListRequest ret = new HServerListRequest();

            return(ret);
        }