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

Use a boolean instead of an options object #951

Merged
merged 1 commit into from
Jan 3, 2017
Merged

Use a boolean instead of an options object #951

merged 1 commit into from
Jan 3, 2017

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented Jan 2, 2017

With this change Websocket.prototype.ping() and Websocket.prototype.pong() take a boolean as second argument instead of an options object.

Ping/Pong messages can't be compressed or fragmented and are always binary, so I think it doesn't make sense to use an options object as the only thing which can be (arguably) configured is whether or not to mask data.

@3rd-Eden
Copy link
Member

3rd-Eden commented Jan 3, 2017

+1, 3 is about the max amount of arguments we should allow though.

@3rd-Eden 3rd-Eden merged commit b187775 into master Jan 3, 2017
@3rd-Eden 3rd-Eden deleted the use/boolean branch January 3, 2017 12:17
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.

2 participants