Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
gpg::IEndpointDiscoveryListener
Ini adalah class abstrak.
#include <i_endpoint_discovery_listener.h>
Menentukan antarmuka yang dapat dikirimkan peristiwa yang terkait dengan penemuan endpoint jarak jauh.
Ringkasan
Fungsi publik
|
OnEndpointFound(int64_t client_id, const EndpointDetails & endpoint_details)=0
|
virtual void
Dipanggil saat endpoint jarak jauh ditemukan; akan dipanggil sekali untuk setiap endpoint yang ditemukan.
|
OnEndpointLost(int64_t client_id, const std::string & remote_endpoint_id)=0
|
virtual void
Dipanggil saat endpoint jarak jauh tidak dapat ditemukan lagi; hanya akan dipanggil dengan ID yang sebelumnya diteruskan ke OnEndpointFound .
|
Fungsi publik
OnEndpointFound
virtual void OnEndpointFound(
int64_t client_id,
const EndpointDetails & endpoint_details
)=0
Dipanggil saat endpoint jarak jauh ditemukan; akan dipanggil sekali untuk setiap endpoint yang ditemukan.
Perhatikan bahwa metode ini dapat dipanggil berulang kali secara berurutan dalam waktu singkat; Anda dapat menunda pembaruan ke UI untuk mencerminkan endpoint baru selama jangka waktu singkat setelah metode dipanggil.
OnEndpointLost
virtual void OnEndpointLost(
int64_t client_id,
const std::string & remote_endpoint_id
)=0
Dipanggil saat endpoint jarak jauh tidak dapat ditemukan lagi; hanya akan dipanggil dengan ID yang sebelumnya diteruskan ke OnEndpointFound
.
Perhatikan bahwa metode ini dapat dipanggil berulang kali secara berurutan dalam waktu singkat; Anda dapat menunda pembaruan ke UI untuk mencerminkan endpoint yang hilang selama jangka waktu singkat setelah metode dipanggil.
~IEndpointDiscoveryListener
virtual ~IEndpointDiscoveryListener()
Konten dan contoh kode di halaman ini tunduk kepada lisensi yang dijelaskan dalam Lisensi Konten. Java dan OpenJDK adalah merek dagang atau merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-27 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 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```"]]