Skip to main content

Namespaces

The HiveMQtt client is broken in to a few key namespaces that provides various functionality. This page serves as a reference to these namespaces and what they encapsulate.

Definition

In C#, a namespace is a way to organize and group related classes, interfaces, structs, enums, and other types. It provides a hierarchical naming structure to avoid naming conflicts and to provide logical separation of code elements. Namespaces help in organizing code into logical units, improving code readability, and facilitating code reuse.

Example

using HiveMQtt.Client;
using HiveMQtt.MQTT5.Types;

/// code

List of Namespaces

NamespaceDescriptionClasses
HiveMQtt.ClientBase namespace for the HiveMQClient and related classes.HiveMQClient, LastWillAndTestament, etc...
HiveMQtt.Client.OptionsClass that encapsulate options.ConnectOptions, DisconnectOptions, SubscribeOptions etc...
HiveMQtt.Client.EventsClasses related to the event subsystem.See events reference.
HiveMQtt.Client.ExceptionsHiveMQtt Exceptions.HiveMQttClientException
HiveMQtt.Client.ReasonCodesReason code exceptions.QoS1ReasonCode, QoS2ReasonCode
HiveMQtt.Client.ResultsResult classes.ConnectResult, PublishResult, SubscribeResult, UnsubscribeResult
HiveMQtt.MQTT5.TypesMQTT protocol types.QualityOfService, RetainHandling, TopicFilter etc...
HiveMQtt.MQTT5.PacketsMQTT packet classes.ConnectPacket, PingReqPacket etc...
HiveMQtt.MQTT5.ReasonCodesPacket level reason codes.ConnAckReasonCode, PubRecReasonCode