GatewayInfo Event

Fired when the class receives a GWINFO or ADVERTISE packet.

Syntax

ANSI (Cross Platform)
virtual int FireGatewayInfo(MQTTSNGatewayInfoEventParams *e);
typedef struct {
const char *MessageType;
int GatewayId;
const char *GatewayAddress;
int Interval; int reserved; } MQTTSNGatewayInfoEventParams; Unicode (Windows) virtual INT FireGatewayInfo(MQTTSNGatewayInfoEventParams *e);
typedef struct {
LPCWSTR MessageType;
INT GatewayId;
LPCWSTR GatewayAddress;
INT Interval; INT reserved; } MQTTSNGatewayInfoEventParams;
- (void)onGatewayInfo:(NSString*)messageType :(int)gatewayId :(NSString*)gatewayAddress :(int)interval;
#define EID_MQTTSN_GATEWAYINFO 5

virtual INT IPWORKSIOT_CALL FireGatewayInfo(LPSTR &lpszMessageType, INT &iGatewayId, LPSTR &lpszGatewayAddress, INT &iInterval);

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.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 C++ Edition - Version 20.0 [Build 8265]