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

Added a broadcast method for ByteBuffers #712

Merged
merged 3 commits into from
May 27, 2018
Merged

Added a broadcast method for ByteBuffers #712

merged 3 commits into from
May 27, 2018

Conversation

PhilipRoman
Copy link
Collaborator

Description

Added two new methods to WebSocketServer: broadcast(ByteBuffer) and broadcast(ByteBuffer, Collection<WebSocket>).
Since was duplicated code, I forwarded the broadcast(byte[]) methods to the ByteBuffer version by using ByteBuffer.wrap

Related Issue

#711

Motivation and Context

It allows broadcasting data from a ByteBuffer.

How Has This Been Tested?

All tests are passing.
I haven't added any extra tests, mostly because I have no idea where to put them (where are the old broadcast methods tested?). Whoever reviews this, please answer that.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project. (I have retained the code style/formatting from the fragments I've edited)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@marci4 marci4 self-requested a review May 25, 2018 14:55
@marci4
Copy link
Collaborator

marci4 commented May 25, 2018

Hello @PhilipRoman,

thank you for your PR :)
Since I am busy this weekend, I can take a look at this Sunday evening!

For the tests, I opened #713 to cover this!

Best regards,
marci4

Copy link
Collaborator

@marci4 marci4 left a comment

Choose a reason for hiding this comment

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

Looks good!

@marci4 marci4 merged commit 41cf972 into TooTallNate:master May 27, 2018
@marci4
Copy link
Collaborator

marci4 commented May 27, 2018

Hello @PhilipRoman,

thank you again for your contribution!

Best regards,
marci4

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.

2 participants