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

Make decoder callback based #7

Closed
rauchg opened this issue Feb 14, 2013 · 2 comments
Closed

Make decoder callback based #7

rauchg opened this issue Feb 14, 2013 · 2 comments

Comments

@rauchg
Copy link
Contributor

rauchg commented Feb 14, 2013

It should emit a callback with each packet:

decodePayload(packetsString, function(packet, isLast){});

Callback arguments:

  • packet just like each item of the returned array right now
  • isLast true if it's the last packet in the payload, false otherwise.

Instead of returning an array like it is now.
This will give us the possibility of giving events to the user before all packets are parsed from the string (important for very big payloads).

Let's make sure to add tests for this.

@rauchg
Copy link
Contributor Author

rauchg commented Feb 14, 2013

@sweetieSong is gonna tackle this.

@defunctzombie
Copy link
Contributor

This is likely done when @rase- did the work for blobs.

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