Skip to content

Add clousures beside to delegates#182

Merged
emqplus merged 2 commits intoemqx:masterfrom
xandrefreire:dev
Feb 16, 2018
Merged

Add clousures beside to delegates#182
emqplus merged 2 commits intoemqx:masterfrom
xandrefreire:dev

Conversation

@xandrefreire
Copy link
Copy Markdown
Contributor

@xandrefreire xandrefreire commented Jan 18, 2018

Based on issues #123

Now we can use closures instead of delegate.

Example:

mqtt.didReceiveMessage = { mqtt, message, id in
    print("Message received in topic \(message.topic) with payload \(message.string!)")           
}

Thanks.

@xandrefreire xandrefreire mentioned this pull request Jan 22, 2018
@emqplus emqplus added this to the Shipping 1.1.0 milestone Feb 16, 2018
@emqplus emqplus merged commit fddfa86 into emqx:master Feb 16, 2018
@riccardoch
Copy link
Copy Markdown

I've downloaded version 1.1.1, but I can't add closures.
Hasn't this feature been released yet?

@HJianBo
Copy link
Copy Markdown
Member

HJianBo commented Mar 28, 2018

@riccardoch Yes, It will be contained in the next release version

If you want to use this feature, clone the latest on the master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants