Skip to content

Conversation

@kevinmartin
Copy link
Contributor

When the specified event is emitted, the handler deregisters itself.

When the specified event is emitted, the handler deregisters itself.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need type declarations here.

let handler = SocketEventHandler(event: event) {data, ack in

Should be fine

@kevinmartin
Copy link
Contributor Author

All fixed! 👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't compare structs. I looked at other Swift-based event dispatchers that support removing specific handlers and they use id's like this to compare them.

nuclearace added a commit that referenced this pull request Sep 18, 2015
Adds SocketIOClient#once(event, callback)
@nuclearace nuclearace merged commit 70c7dac into socketio:master Sep 18, 2015
@lightsprint09
Copy link
Contributor

It would be great to cover this functions with tests... In my opinion every new functions should be tested, before the PR is merged

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

Successfully merging this pull request may close these issues.

4 participants