Search Results for

    Show / Hide Table of Contents

    Interface IMqttConnectable

    This interface provides extended methods, based on the interfaces IConnectable and IAsyncConnectable in order to build mqtt connections to external brokers.

    Inherited Members
    IConnectable.Connected
    IConnectable.Disconnected
    IConnectable.Completed
    IConnectable.Failed
    IConnectable.IsConnected
    IConnectable.Connect()
    IConnectable.Disconnect()
    IAsyncConnectable.ConnectAsync()
    IAsyncConnectable.DisconnectAsync()
    Namespace: TeleScope.Connectors.Mqtt.Abstractions
    Assembly: TeleScope.Connectors.Mqtt.Abstractions.dll
    Syntax
    public interface IMqttConnectable : IConnectable, IAsyncConnectable

    Methods

    | Improve this Doc View Source

    PublishAsync(String, String)

    Sends a message string asynchronously to a given broker.

    Declaration
    Task PublishAsync(string topic, string message)
    Parameters
    Type Name Description
    System.String topic

    The topic of the message.

    System.String message

    The message that will be sent.

    Returns
    Type Description
    Task

    The executing task.

    | Improve this Doc View Source

    PublishAsync(String, String, Int32)

    Sends a message string asynchronously to a given broker.

    Declaration
    Task PublishAsync(string topic, string message, int qualityOfService)
    Parameters
    Type Name Description
    System.String topic

    The topic of the message.

    System.String message

    The message that will be sent.

    System.Int32 qualityOfService

    The level of quality that will be used for sending.

    Returns
    Type Description
    Task

    The executing task.

    | Improve this Doc View Source

    Subscribe(String)

    Subscribes to a new topic that the client will listen to.

    Declaration
    IMqttConnectable Subscribe(string topic)
    Parameters
    Type Name Description
    System.String topic

    The topic of interest.

    Returns
    Type Description
    IMqttConnectable

    The calling instance.

    | Improve this Doc View Source

    Unsubscribe(String)

    Unsubscribes from a topic that the client will no longer listen to.

    Declaration
    IMqttConnectable Unsubscribe(string topic)
    Parameters
    Type Name Description
    System.String topic

    The topic that will be removed.

    Returns
    Type Description
    IMqttConnectable

    The calling instance.

    • GITHUB
    • Improve this Doc
    • View Source
    ☀
    ☾
    In This Article
    Back to top
    Copyright 2020-2022 TeleScope-dotnet. Generated by DocFX.
    ☀
    ☾