Latest 0.1.5
Homepage https://github.com/xuwenquan/MqttEx
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

-(void) connect {
    mqttClient=[[MqttClientEx alloc] initWithClientId:@"some_unique_id"];
    mqttClient.host=MQTT_SERVER;
    mqttClient.username=MQTT_USERNAME;
    mqttClient.password=MQTT_PASSWORD;

    [mqttClient connectWithCompletionHandler:^(MQTTConnectionReturnCode code) {
        NSLog(@"mqtt is connected");
        mqttClient.keepAlive = 0;
        [[NSNotificationCenter defaultCenter] postNotificationName:MQTT_CONNECTED object:nil];
    }];

    mqttClient.disconnectionHandler=^(NSUInteger code)
    {
        NSLog(@"mqtt is disconnected");
    };

}

-(void) example {
    [mqttClient subscribe:@"a" withTag:@"tag1" wittMessageHandler:^(MQTTMessage *message) {

    } withCompletionHandler:nil];

    [mqttClient subscribe:@"a" withTag:@"tag2" wittMessageHandler:^(MQTTMessage *message) {

    } withCompletionHandler:nil];

}

-(void) stop {
    mqttClient.keepAlive = 0;
}

Requirements

Installation

MqttEx is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "MqttEx"

Author

xuwq, [email protected]

License

MqttEx is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MqttEx",
    "version": "0.1.5",
    "summary": "MqttEx subscribe on the one topic multiple times",
    "description": "This package includes the mosquitto library and a MqttKit from https://github.com/mobile-web-messaging/MQTTKit.nThe original MqttClientEx a extension of MqttClient with the ability to subscribe the same topic multiple times.",
    "homepage": "https://github.com/xuwenquan/MqttEx",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "xuwq": "[email protected]"
    },
    "source": {
        "git": "https://github.com/xuwenquan/MqttEx.git",
        "tag": "0.1.5"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MqttEx/Classes/**/*"
}

Pin It on Pinterest

Share This