|
(void) | + initialize |
|
(NSString *) | + version |
|
|
struct mosquitto * | mosq |
|
NSTimer * | timer |
|
Clears the will that was set with setWill().
Connects to the host designated if the host has already been set.
- (void) connectToHost: |
|
(NSString*) |
host |
|
Connects to the given host.
- Parameters
-
host | String that represents the host address. |
Disconnect from the host.
- (MQTTClient *) initWithClientId: |
|
(NSString *) |
clientId |
|
Initalize a new MQTTClient object with a clientID
- Parameters
-
clientId | String that represents the client ID |
- Returns
- a newly initialized MQTTClient
- (void) publishString: |
|
(NSString *) |
payload |
toTopic: |
|
(NSString *) |
topic |
withQos: |
|
(NSUInteger) |
qos |
retain: |
|
(BOOL) |
retain |
|
|
| |
Publishes a string to the host on a given topic
- Parameters
-
payload | String that holds the message to be sent |
topic | String that represents the topic to which the message is sent |
qos | NSUInteger that represents the quality of service level that the message will be sent with |
retain | BOOL that flags the message to be retained or not |
Disconnect from the host and establish a new connection.
- (void) setMessageRetry: |
|
(NSUInteger) |
seconds |
|
Sets how often the message will retry.
- Parameters
-
seconds | NSUInteger that represent the amount of time between retries. |
- (void) setWill: |
|
(NSString *) |
payload |
toTopic: |
|
(NSString *) |
willTopic |
withQos: |
|
(NSUInteger) |
willQos |
retain: |
|
(BOOL) |
retain |
|
|
| |
Message to be sent upon disconnect
- Parameters
-
payload | String that holds the message to be sent |
willTopic | String that represents the topic to which the Will message is sent |
willQos | NSUInteger that represents the quality of service level that the message will be sent with |
retain | BOOL that flags the message to be retained or not |
- (void) subscribe: |
|
(NSString *) |
topic |
|
Subscribes to the given topic to receive messages sent to that topic
- Parameters
-
topic | String that represents the topic to be listened on |
- (void) subscribe: |
|
(NSString *) |
topic |
withQos: |
|
(NSUInteger) |
qos |
|
|
| |
Subscribes to the given topic to receive messages sent to that topic with the given QOS
- Parameters
-
topic | String that represents the topic to be listened on |
qos | NSUInteger that represents the quality of service level that the message will be recieved with |
- (void) unsubscribe: |
|
(NSString *) |
topic |
|
Unsubscibes from the given topic
- Parameters
-
topic | String that represents the topic from which to be unsubscribed |
Boolean to flag a clean session.
Pointer to the delegate object that will handle messages when received.
The string that holds the host address.
- (unsigned short) keepAlive |
|
readwriteatomicassign |
The amount of time to keep alive
The string that holds the password of the client.
The port number of the host.
The string that holds the username of the client.
The documentation for this class was generated from the following files: