vi / tokio-listener Goto Github PK
View Code? Open in Web Editor NEWUnified way to specify AF_INET or AF_UNIX address for listening sockets in Tokio projects (or inetd mode)
Unified way to specify AF_INET or AF_UNIX address for listening sockets in Tokio projects (or inetd mode)
As described in https://mgdm.net/weblog/systemd-socket-activation/, it's possible to receive multiple sockets, and they can have names attached.
This can be used to have multiple .socket
files (with different FileDescriptorName=
values).
For example, one socket could be used for http
, and another one for https
connections.
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 TcpListener
s.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.