ClientId Property

A string that uniquely identifies this instance of the class to the server.


ANSI (Cross Platform)
char* GetClientId();
int SetClientId(const char* lpszClientId); Unicode (Windows) LPWSTR GetClientId();
INT SetClientId(LPCWSTR lpszClientId);
@property (nonatomic,readwrite,assign,getter=clientId,setter=setClientId:) NSString* clientId;
- (NSString*)clientId;
- (void)setClientId:(NSString*)newClientId;

IPWORKSIOT_EXTERNAL void* IPWORKSIOT_CALL IPWorksIoT_MQTTSN_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSIOT_EXTERNAL int IPWORKSIOT_CALL IPWorksIoT_MQTTSN_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);

Default Value



The ClientId string is used by the server to uniquely identify each client that is connected to it.

If ClientId is empty when Connect is called, the class's behavior depends on value of CleanSession. If CleanSession is True, the class will automatically generate a unique value for ClientId before connecting. If CleanSession is False, the class fails with an error.

This property is not available at design time.

Data Type


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