Skip to content

Conversation

@keelerm84
Copy link
Member

No description provided.

@keelerm84 keelerm84 requested a review from a team as a code owner January 6, 2026 18:38
pub fn new() -> Self {
let connector = hyper_util::client::legacy::connect::HttpConnector::new();
let timeout_connector = TimeoutConnector::new(connector);
let client = HyperClient::builder(TokioExecutor::new()).build(timeout_connector);
Copy link
Member Author

Choose a reason for hiding this comment

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

We are instantiating a new tokio executor here and in a couple of other places I'll point out. Think we need to add the option to provide the executor, or should we wait until it is specifically requested?

Copy link
Member

Choose a reason for hiding this comment

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

I am not sure if would want to extend the API surface with more external library dependencies unless we have a driver for it. I think, because we have this whole transport behind a trait, worse case scenario you can copy/paste this transport and use your own executor. Where this would have been more important when the transport wasn't replaceable.

.build();

let timeout_connector = TimeoutConnector::new(connector);
let client = HyperClient::builder(TokioExecutor::new()).build(timeout_connector);
Copy link
Member Author

Choose a reason for hiding this comment

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

TokExecutor::new

timeout_connector.set_read_timeout(self.read_timeout);
timeout_connector.set_write_timeout(self.write_timeout);

let client = HyperClient::builder(TokioExecutor::new()).build(timeout_connector);
Copy link
Member Author

Choose a reason for hiding this comment

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

TokExecutor::new

///
/// let transport = MyTransport::new();
/// let client = ClientBuilder::for_url("https://example.com/events")?
/// let client = ClientBuilder::for_url("https://sse.dev/test")
Copy link
Member

Choose a reason for hiding this comment

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

Do we know who maintains sse.dev?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, I don't. The site shows a "Brought to you by https://www.stubber.com/", but that's about as much as I know.

If you want, we could change it over to the live scores feed we control: http://live-test-scores.herokuapp.com/scores

///
/// This timeout applies when reading data from the connection.
/// There is no read timeout by default.
pub fn read_timeout(mut self, timeout: Duration) -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

This is still just an initial socket read timeout, correct? We don't yet have a keepalive style timeout?

Copy link
Member

Choose a reason for hiding this comment

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

It does sound like maybe hyper supports tcp keepalive though.

Copy link
Member Author

Choose a reason for hiding this comment

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

No, this should be a real read timeout since we are using the timeout connector. If you don't send something every X seconds, this will drop the connection if configured low enough.

Base automatically changed from mk/sdk-1724/remove-hyper-dependency to feat/hyper-as-feature January 9, 2026 15:14
@keelerm84 keelerm84 force-pushed the mk/sdk-1726/hyper-transport branch from d5775c7 to 3aed52f Compare January 9, 2026 15:19
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.

3 participants