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

get ready for hyper's 0.11 changes #6

Closed
softprops opened this issue Mar 23, 2017 · 8 comments
Closed

get ready for hyper's 0.11 changes #6

softprops opened this issue Mar 23, 2017 · 8 comments

Comments

@softprops
Copy link
Owner

softprops commented Mar 23, 2017

some discussion is being had over here hyperium/hyper#126

@kevincox
Copy link

kevincox commented Aug 4, 2017

It appears that these changes have landed.

@softprops
Copy link
Owner Author

I've already started a local branch for this. The client was actually really easy to implement ( easier than I thought ). The server listener is proving to be more difficult. Mostly because there aren't may examples of documentation of how to customize the server's listening backend with the newer model

@skinowski
Copy link

Would you mind sharing the client-only changes?

@softprops
Copy link
Owner Author

Sure I'll push up a branch tonight. In the meantime I reached out to the hyper maintainers to see if I could get some insight on extending the new server model

@softprops
Copy link
Owner Author

this is what I have so far. I have the client working in an example here still working on getting the server bits line up

@skinowski
Copy link

skinowski commented Aug 11, 2017

Thank you, I've playing around with this code, but I'm getting errors such as:

error[E0599]: no method named `build` found for type `hyper::client::Config<uds::UnixSocketConnector, hyper::Body>` in the current scope
   --> src/collector.rs:181:7
    |
181 |                                   .build(&core.handle.as_ref().borrow().clone()))
    |                                    ^^^^^
    |
    = note: the method `build` exists but the following trait bounds were not satisfied:
            `uds::UnixSocketConnector : hyper::client::Connect`

I'm on hyper 0.11.2, and it seems like hyper::client::Connect trait needs implementation, not service for the client?

Which is interesting since Hyper::client::Connect has the following comments for Connect trait:

/// A connector creates an Io to a remote address..
///
/// This trait is not implemented directly, and only exists to make
/// the intent clearer. A connector should implement `Service` with
/// `Request=Uri` and `Response: Io` instead.
pub trait Connect: Service<Request=Uri, Error=io::Error> + 'static {

@softprops
Copy link
Owner Author

Hoping to get a chance to followup this weekend

@softprops
Copy link
Owner Author

async hyper 0.11 support is now on master. see the examples directory for an example client and server usage

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

No branches or pull requests

3 participants