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

Implement an OkHttpChannels factory class #355

Merged
merged 4 commits into from
Feb 18, 2020

Conversation

carterkozak
Copy link
Contributor

Before this PR

Difficult to make an okhttp based channel.

After this PR

==COMMIT_MSG==
Implement an OkHttpChannels factory class based on CJR without duplicated functionality.
==COMMIT_MSG==

Possible downsides?

We don't really want to use okhttp, but it's helpful to have a class to compare with.

@changelog-app
Copy link

changelog-app bot commented Feb 17, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Implement an OkHttpChannels factory class based on CJR without duplicated functionality.

Check the box to generate changelog(s)

  • Generate changelog entry

.dispatcher(dispatcher)
.connectionPool(connectionPool)
.followRedirects(false) // We implement our own redirect logic.
.sslSocketFactory(config.sslSocketFactory(), config.trustManager())
Copy link
Contributor

Choose a reason for hiding this comment

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

have we lost the KeepAliveSslSocketFactory here? Maybe we should just make it public in c-j-r?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct, this doesn't record client tls handshake metrics or set keepalive. Agree that we should be consistent across all clients.

@carterkozak carterkozak force-pushed the ckozak/okhttp_channels_factory branch from 442f023 to b718b48 Compare February 17, 2020 22:00
Copy link
Contributor

@iamdanfox iamdanfox left a comment

Choose a reason for hiding this comment

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

LGTM - don't think the KeepAliveSocketFactory thing should be a blocker

@bulldozer-bot bulldozer-bot bot merged commit 6793ba9 into develop Feb 18, 2020
@bulldozer-bot bulldozer-bot bot deleted the ckozak/okhttp_channels_factory branch February 18, 2020 01:05
@carterkozak
Copy link
Contributor Author

I've enabled keep-alive on the apache hc implementation in #335 :-)

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