Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

listen functionality #203

Closed
timaschew opened this issue Aug 8, 2016 · 1 comment
Closed

listen functionality #203

timaschew opened this issue Aug 8, 2016 · 1 comment
Assignees

Comments

@timaschew
Copy link
Contributor

timaschew commented Aug 8, 2016

client side of deepstreamIO/deepstream.io#317

@timaschew timaschew self-assigned this Aug 8, 2016
@timaschew
Copy link
Contributor Author

timaschew commented Aug 8, 2016

If accept or rejectis not called in the callback of listen it will show a deprecated warning.

// ++ record API ++
client.record.listen('pattern', (match, isSubscribed, response) => {
  response.accept()
  response.reject()
})

const record = client.record.getRecord('foo/bar')
record.hasProvider // boolean value
// new event
record.on('hasProviderChanged', (hasProvider) => {

})

// ++ event API ++
client.event.listen('pattern', (eventName, isSubscribed, response) => {
  response.accept()
  response.reject()
})

yasserf added a commit that referenced this issue Aug 28, 2016
* provide accept and reject as property of the third argument in the listen callback

* add link to deprecated issue

* fix some listening issues
- unlisten and listen
- ignore pattern removed after unlistening
- ignore has provider after discarding

* Adding new-e2e gherkin tests to build
@yasserf yasserf closed this as completed Sep 8, 2016
@yasserf yasserf removed the in review label Sep 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants