Comments (6)
Not right now. tokio is being reworked, so I would wait for that before attempting to write it. You can also run this library in a thread pool, giving you the same result. If you want to take a shot at it, I'll review and merge it though.
from rust-igd.
I would probably able to do it. Do you think there should then be always two methods? One that returns a Future but does not block and one that does block? Or should there only be a Future version and a user would call wait to block?
from rust-igd.
I wouldn't change the current API. I would also add the tokio support behind a feature flag, so that you can only enable it when you need it. So it would be a separate async API.
from rust-igd.
Hm, hyper works either with or without tokio but not both. Would it be ok if tokio was always used but a synchronous API was still provided?
from rust-igd.
No way to avoid it I guess. A lot of people are using the current API, so let's no break it. Just add the async support as a new API.
from rust-igd.
I updated the implementation to adjust for changes in tokio/hyper.
https://github.com/maufl/rust-igd/tree/update-hyper
I'm not sure whether the implementation should be merged, I think the error handling could be improved.
from rust-igd.
Related Issues (17)
- Feature: Support port mappings HOT 3
- IGD 2.0 support HOT 4
- Use rustdoc for documentation
- Feature: Support parsing of the device's information
- GetListOfPortMappings()
- Support WANPPPConnection service type
- Support InternetGatewayDevice:2 HOT 1
- Move to hyper
- Problems with signal traps since 0.7 HOT 16
- search_gateway(), IO error: Resource temporarily unavailable (os error 11) HOT 2
- Improve error handling, remove unwraps/panics
- IPv6 support
- Wrong order of arguments in AddPortMapping HOT 1
- Add a timeout/deadline to the udp socket HOT 1
- search_gateway() fails on dual-stack LAN HOT 2
- Proper XML parsing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-igd.