Exemplo n.º 1
0
        public GClient()
        {
            m_CallbackP2PSessionRequest = Callback<P2PSessionRequest_t>.Create(OnP2PSessionRequest);

            matchmakingPingResponse = new ISteamMatchmakingPingResponse(MatchmakingPing_ServerResponded, MatchmakingPing_ServerFailedToRespond);

            m_CallbackP2PSessionConnectFail = Callback<P2PSessionConnectFail_t>.Create(OnP2PSessionFailed);

            if (_Instance != null)
                throw new System.InvalidOperationException("Instance was already set.");

            _Instance = this;
        }
 public ISteamMatchmakingPingResponse(ISteamMatchmakingPingResponse.ServerResponded onServerResponded, ISteamMatchmakingPingResponse.ServerFailedToRespond onServerFailedToRespond)
 {
     if (onServerResponded == null || onServerFailedToRespond == null)
     {
         throw new ArgumentNullException();
     }
     this.m_ServerResponded = onServerResponded;
     this.m_ServerFailedToRespond = onServerFailedToRespond;
     this.m_VTable = new ISteamMatchmakingPingResponse.VTable
     {
         m_VTServerResponded = new ISteamMatchmakingPingResponse.InternalServerResponded(this.InternalOnServerResponded),
         m_VTServerFailedToRespond = new ISteamMatchmakingPingResponse.InternalServerFailedToRespond(this.InternalOnServerFailedToRespond)
     };
     this.m_pVTable = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(ISteamMatchmakingPingResponse.VTable)));
     Marshal.StructureToPtr(this.m_VTable, this.m_pVTable, false);
     this.m_pGCHandle = GCHandle.Alloc(this.m_pVTable, GCHandleType.Pinned);
 }
Exemplo n.º 3
0
 public static HServerQuery PingServer(uint unIP, ushort usPort, ISteamMatchmakingPingResponse pRequestServersResponse)
 {
     InteropHelp.TestIfAvailableClient();
     return((HServerQuery)NativeMethods.ISteamMatchmakingServers_PingServer(unIP, usPort, (IntPtr)pRequestServersResponse));
 }
		/// <summary>
		/// <para>-----------------------------------------------------------------------------</para>
		/// <para> Queries to individual servers directly via IP/Port</para>
		/// <para>-----------------------------------------------------------------------------</para>
		/// <para> Request updated ping time and other details from a single server</para>
		/// </summary>
		public static HServerQuery PingServer(uint unIP, ushort usPort, ISteamMatchmakingPingResponse pRequestServersResponse) {
			InteropHelp.TestIfAvailableClient();
			return (HServerQuery)NativeMethods.ISteamMatchmakingServers_PingServer(unIP, usPort, (IntPtr)pRequestServersResponse);
		}
	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);
	}
        }                                                                                                                                        // 0x00000001807A4560-0x00000001807A45C0

        public static HServerQuery PingServer(uint unIP, ushort usPort, ISteamMatchmakingPingResponse pRequestServersResponse) => default;       // 0x00000001807A4370-0x00000001807A4440
Exemplo n.º 7
0
        /// Queries to individual servers directly via IP/Port

        /// Request updated ping time and other details from a single server
        public static HServerQuery PingServer(uint unIP, ushort usPort, ISteamMatchmakingPingResponse pRequestServersResponse)
        {
            return((HServerQuery)0);
        }