Table of Contents

Struct PamojaMqttConfig

Namespace
Pamoja.Native.Interop
Assembly
Pamoja.Native.dll

Connection settings passed to pamoja_mqtt_client_new(ref PamojaMqttConfig), mirroring PamojaMqttConfig in pamoja.h.

public struct PamojaMqttConfig
Inherited Members

Remarks

ClientId and Host are pointers to null-terminated UTF-8 strings borrowed for the duration of the call. A KeepAliveSecs, Capacity, or MaxPacketSize of 0 selects the core default. Username, Password, Will, and Tls are each Zero when unused.

Fields

Capacity

Bound on outstanding client requests, or 0 for the default of 64.

public uint Capacity

Field Value

uint

ClientId

Pointer to the UTF-8 MQTT client identifier presented to the broker.

public nint ClientId

Field Value

nint

Host

Pointer to the UTF-8 broker hostname or IP address.

public nint Host

Field Value

nint

KeepAliveSecs

Keep-alive interval in seconds, or 0 for the default of 30.

public uint KeepAliveSecs

Field Value

uint

MaxPacketSize

The largest packet the connection sends or accepts, in bytes, or 0 for the default of 10,240.

public uint MaxPacketSize

Field Value

uint

Password

Pointer to the UTF-8 password to sign in with, or zero.

public nint Password

Field Value

nint

Port

The broker TCP port, conventionally 1883 for plaintext MQTT.

public ushort Port

Field Value

ushort

Qos

Default quality of service for publishes and subscriptions.

public PamojaQos Qos

Field Value

PamojaQos

Tls

Pointer to a PamojaMqttTls, or zero for plain TCP.

public nint Tls

Field Value

nint

Username

Pointer to the UTF-8 name to sign in with, or zero.

public nint Username

Field Value

nint

Will

Pointer to a PamojaMqttWill, or zero.

public nint Will

Field Value

nint