Code Monkey home page Code Monkey logo

tokio-listener's People

Contributors

cbrewster avatar flokli avatar vi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tokio-listener's Issues

Usage with axum >= 0.7.0

Hi,

thank you for this convenient library which promises to very conveniently solve one of my problems :P
While looking through this library, I stumbled accross examples/clap_axum.rs, which seems to be incompatible with axum >= 0.7 and/or hyper >= 1.0 to me:

Hyper 1.0 apparently dropped the hyper::Server interface, and axum followed suit as it just reexported hyper::Server as axum::Server but instead provides an axum::serve interface itself, which, however, is spcifically tied to TcpListeners.

Axum has since also updated their examples (including the unix domain socket example which is probably most relevant to tokio-listeners usage), effectively replicating hyper's previous Server functionality by a custom accept loop.
I believe (without too much certainty, I'm quite new to using axum) that this is now also required for tokio-listener, as it does not offer the TcpListener interface. Furthermore, probably a mechanism akin to what is already implemented for the tonic010 feature might be required to correctly attribute the correct ConnectionInfo type/have a custom ListenerConnectInfo compatible with Router::into_make_service_with_connect_info for situations where connection info is of interest.

Is my assessment correct? Is there any clever way of using tokio-listener together with axum >= 0.7 without too much hassle? What is the recommended way as of now? What would examples/clap_axum.rs look like nowadays?

Thank you for providing this library in the first place, and also thank you for taking the time to read this bug report :) (Furthermore: I'm sorry if I've missed something obvious and thus wasted some of your time).
~ Simon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.