tower-rs / tower

async fn(Request) -> Result<Response, Error>
https://docs.rs/tower
MIT License
3.56k stars 280 forks source link

Question: Multiplexed UDP Client/Server? #565

Open JRAndreassen opened 3 years ago

JRAndreassen commented 3 years ago

I'm trying to find an example on using Tower with a UDP(or ICMP for that matter) multiplexed connection, but not having much luck. Is there a current example somewhere ?

In particular, I need to make a client to issue SNMP requests (Yes I know... SNMP is Dead... Long live SNMP). There are several SNMP frame parses, but no async clients.

I did find an examples for the old version:

Which would be almost perfect, since my implementation would be tagged with ID.

Optimally, I should be able to use Tonic Multiplex, since it has a lot of the features needed already, but there are no facilities for UDP (that I have found)...

If there are no examples, some guidance on which parts needs to be implemented and in what order would be greatly appreciated. I'll be more than happy to share the implementation when it is finished.

Michael-J-Ward commented 3 years ago

tokio-tower provides a multiplex client: https://github.com/tower-rs/tokio-tower/