GatewayInfo Event
Fired when the component receives a GWINFO or ADVERTISE packet.
Syntax
public event OnGatewayInfoHandler OnGatewayInfo; public delegate void OnGatewayInfoHandler(object sender, MqttsnGatewayInfoEventArgs e); public class MqttsnGatewayInfoEventArgs : EventArgs { public string MessageType { get; } public int GatewayId { get; } public string GatewayAddress { get; } public int Interval { get; } }
Public Event OnGatewayInfo As OnGatewayInfoHandler Public Delegate Sub OnGatewayInfoHandler(sender As Object, e As MqttsnGatewayInfoEventArgs) Public Class MqttsnGatewayInfoEventArgs Inherits EventArgs Public ReadOnly Property MessageType As String Public ReadOnly Property GatewayId As Integer Public ReadOnly Property GatewayAddress As String Public ReadOnly Property Interval As Integer End Class
Remarks
This event allows packets containing gateway information to be processed. These packets could be received from regular gateway advertisements or gateway info requests from this or other clients. This gateway information is used to manage the client's list of active gateways.
The value of MessageType could be GWINFO or ADVERTISE.
GatewayAddress will be in format host:port.
If the gateway address field is not present in the received GWINFO packet, GatewayAddress will use the packet source IP address.
This functionality is not yet implemented.