Search Results for

    Show / Hide Table of Contents

    Interface INetworkDiscovery

    Defines the contract for network discovery services.

    Namespace: Morpheo.Sdk
    Assembly: Morpheo.Sdk.dll
    Syntax
    public interface INetworkDiscovery

    Methods

    | Edit this page View Source

    GetPeers()

    Retrieves the list of currently known peers.

    Declaration
    IReadOnlyList<PeerInfo> GetPeers()
    Returns
    Type Description
    IReadOnlyList<PeerInfo>

    A read-only list of peers.

    | Edit this page View Source

    StartAdvertisingAsync(PeerInfo, CancellationToken)

    Starts broadcasting presence (Hello packets) in the background. This method should not block execution.

    Declaration
    Task StartAdvertisingAsync(PeerInfo myInfo, CancellationToken ct)
    Parameters
    Type Name Description
    PeerInfo myInfo

    The local peer information.

    CancellationToken ct

    Cancellation token.

    Returns
    Type Description
    Task
    | Edit this page View Source

    StartListeningAsync(CancellationToken)

    Starts listening for incoming packets in the background. This method should not block execution.

    Declaration
    Task StartListeningAsync(CancellationToken ct)
    Parameters
    Type Name Description
    CancellationToken ct

    Cancellation token.

    Returns
    Type Description
    Task
    | Edit this page View Source

    Stop()

    Stops the discovery service and releases resources (sockets).

    Declaration
    void Stop()

    Events

    | Edit this page View Source

    PeerFound

    Event triggered when a new peer is found.

    Declaration
    event EventHandler<PeerInfo> PeerFound
    Event Type
    Type Description
    EventHandler<PeerInfo>
    | Edit this page View Source

    PeerLost

    Event triggered when a peer is lost.

    Declaration
    event EventHandler<PeerInfo> PeerLost
    Event Type
    Type Description
    EventHandler<PeerInfo>
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © 2025 DEHER Rémi - Propulsé par .NET 10