Skip to content

[C++] Add isConnected() method - #10349

Merged
codelipenghui merged 4 commits into
apache:masterfrom
BewareMyPower:bewaremypower/cpp-is-connect
Apr 25, 2021
Merged

codelipenghui merged 4 commits into
apache:masterfrom
BewareMyPower:bewaremypower/cpp-is-connect

Conversation

@BewareMyPower

Copy link
Copy Markdown
Contributor

Motivation

Add isConnected() method to Producer, Consumer and Reader in C++ client.

Modifications

  • Implement isConnected() method that checks the network connection and state and add related tests.
  • Unify the signature of overrided methods to avoid compile warnings like overrides a member function but is not marked 'override' [-Winconsistent-missing-override]**.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • ProducerTest.testIsConnected
  • ConsumerTest.testIsConnected
  • ReaderTest.testIsConnected

Does this pull request potentially affect one of the following parts:

If yes was chosen, please highlight the changes

  • Dependencies (does it add or upgrade a dependency): (yes / no)
  • The public API: (yes)
  • The schema: (yes / no / don't know)
  • The default values of configurations: (yes / no)
  • The wire protocol: (yes / no)
  • The rest endpoints: (yes / no)
  • The admin cli options: (yes / no)
  • Anything that affects deployment: (yes / no / don't know)

Documentation

  • Does this pull request introduce a new feature? (yes)
  • If yes, how is the feature documented? (docs)

@aahmed-se
aahmed-se requested a review from merlimat April 24, 2021 21:15
@Anonymitaet

Copy link
Copy Markdown
Member

@BewareMyPower docs should be updated as well?

@BewareMyPower

Copy link
Copy Markdown
Contributor Author

@BewareMyPower docs should be updated as well?

I've already added it in C++ headers.

@codelipenghui codelipenghui added this to the 2.8.0 milestone Apr 25, 2021
@codelipenghui codelipenghui added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Apr 25, 2021
@codelipenghui
codelipenghui merged commit c4f5772 into apache:master Apr 25, 2021
@Anonymitaet Anonymitaet added the doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. label Apr 25, 2021
@BewareMyPower
BewareMyPower deleted the bewaremypower/cpp-is-connect branch April 26, 2021 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Your PR contains doc changes, no matter whether the changes are in markdown or code files. type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants