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

Add ability to customize ping messages with custom data #944

Merged
merged 2 commits into from
Nov 21, 2019

Conversation

haruntuncay
Copy link
Collaborator

@haruntuncay haruntuncay commented Nov 20, 2019

Description

Added a method called onPreparePing which provides a way for users customize their ping messages with custom data that they want to send.

Related Issue

Fixes #941

Motivation and Context

Solves the problem where users were not able to customize ping messages. In this context, customizing means filling ping messages with custom payload data.

How Has This Been Tested?

Added a test file.

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.
  • 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.

@PhilipRoman PhilipRoman self-requested a review November 20, 2019 20:12
@marci4
Copy link
Collaborator

marci4 commented Nov 21, 2019

@PhilipRoman thx for the review and @haruntuncay thx for the contribution

* @return PingFrame to be sent.
*/
@Override
public PingFrame onPreparePing(WebSocket conn) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please include the argument?

@marci4 marci4 changed the title Add ability to customize ping messages with custom data, see issue#941 Add ability to customize ping messages with custom data, see iss… Nov 21, 2019
@marci4 marci4 merged commit 89df856 into TooTallNate:master Nov 21, 2019
@haruntuncay
Copy link
Collaborator Author

@PhilipRoman , @marci4 , Thank you both for the review and merge.

@marci4 marci4 changed the title Add ability to customize ping messages with custom data, see iss… Add ability to customize ping messages with custom data Mar 12, 2020
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.

How to send customized ping message on connectionLostTimeout interval
3 participants