Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
gpg::IEndpointDiscoveryListener
Esta es una clase abstracta.
#include <i_endpoint_discovery_listener.h>
Define una interfaz a la que se pueden entregar eventos relacionados con el descubrimiento de extremos remotos.
Resumen
Funciones públicas
|
OnEndpointFound(int64_t client_id, const EndpointDetails & endpoint_details)=0
|
virtual void
Se invoca cuando se encuentra un extremo remoto. Se invocará una vez por cada extremo descubierto.
|
OnEndpointLost(int64_t client_id, const std::string & remote_endpoint_id)=0
|
virtual void
Se invoca cuando un extremo remoto ya no se puede detectar. Solo se llamará con los IDs que se pasaron anteriormente a OnEndpointFound .
|
Funciones públicas
OnEndpointFound
virtual void OnEndpointFound(
int64_t client_id,
const EndpointDetails & endpoint_details
)=0
Se invoca cuando se encuentra un extremo remoto. Se invocará una vez por cada extremo descubierto.
Ten en cuenta que este método se puede invocar de forma reiterada en una sucesión breve. Te recomendamos que demores la actualización de la IU para que refleje el nuevo extremo durante un período breve después de que se invoque el método.
OnEndpointLost
virtual void OnEndpointLost(
int64_t client_id,
const std::string & remote_endpoint_id
)=0
Se invoca cuando un extremo remoto ya no se puede descubrir. Solo se llamará con los IDs que se pasaron anteriormente a OnEndpointFound
.
Ten en cuenta que este método se puede invocar de forma reiterada en una sucesión breve. Te recomendamos que demores la actualización de la IU para reflejar que el extremo no está disponible durante un período breve después de que se invoque el método.
~IEndpointDiscoveryListener
virtual ~IEndpointDiscoveryListener()
El contenido y las muestras de código que aparecen en esta página están sujetas a las licencias que se describen en la Licencia de Contenido. Java y OpenJDK son marcas registradas de Oracle o sus afiliados.
Última actualización: 2025-07-27 (UTC)
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Falta la información que necesito","missingTheInformationINeed","thumb-down"],["Muy complicado o demasiados pasos","tooComplicatedTooManySteps","thumb-down"],["Desactualizado","outOfDate","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Problema con las muestras o los códigos","samplesCodeIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-07-27 (UTC)"],[],[],null,["# gpg::IEndpointDiscoveryListener Class Reference\n\ngpg::IEndpointDiscoveryListener\n===============================\n\n**This is an abstract class.** \n\n`#include \u003ci_endpoint_discovery_listener.h\u003e`\n\nDefines an interface which can be delivered events relating to remote endpoint discovery.\n\nSummary\n-------\n\n| ### Constructors and Destructors ||\n|---|---|\n| [~IEndpointDiscoveryListener](#classgpg_1_1_i_endpoint_discovery_listener_1af718bcd26588adb81940859a661c259e)`()` ||\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [OnEndpointFound](#classgpg_1_1_i_endpoint_discovery_listener_1a63a9026d38cd0f4cd243c0b78de3e912)`(int64_t client_id, const `[EndpointDetails](/games/services/cpp/api/struct/gpg/endpoint-details#structgpg_1_1_endpoint_details)` & endpoint_details)=0` | `virtual void` Invoked when a remote endpoint is found; will be invoked once for each endpoint discovered. |\n| [OnEndpointLost](#classgpg_1_1_i_endpoint_discovery_listener_1a51c0db65f67b47f105cd44b89ced342a)`(int64_t client_id, const std::string & remote_endpoint_id)=0` | `virtual void` Invoked when a remote endpoint is no longer discoverable; will only be called with IDs that previously were passed to `OnEndpointFound`. |\n\nPublic functions\n----------------\n\n### OnEndpointFound\n\n```c++\nvirtual void OnEndpointFound(\n int64_t client_id,\n const EndpointDetails & endpoint_details\n)=0\n``` \nInvoked when a remote endpoint is found; will be invoked once for each endpoint discovered.\n\nNote that this method may be invoked repeatedly in short succession; you may wish to delay the update to the UI to reflect the new endpoint for some short time period after the method is invoked. \n\n### OnEndpointLost\n\n```c++\nvirtual void OnEndpointLost(\n int64_t client_id,\n const std::string & remote_endpoint_id\n)=0\n``` \nInvoked when a remote endpoint is no longer discoverable; will only be called with IDs that previously were passed to `OnEndpointFound`.\n\nNote that this method may be invoked repeatedly in short succession; you may with to delay the update to the UI to reflect the endpoint being gone for some short time period after the method is invoked. \n\n### \\~IEndpointDiscoveryListener\n\n```c++\nvirtual ~IEndpointDiscoveryListener()\n```"]]