Commit Graph

42 Commits (ed248017b476f17334260db31daf82cc07c2a465)

Author SHA1 Message Date
Katharina Fey 081166f204
Fixing inaccurate function description in udp::recv 5 years ago
Toralf Wittner c90732a805 TcpStream: Shutdown write direction in poll_close.
Fixes #599.
5 years ago
Bryant Luk fd86effb63
Change recv_from to recv in UdpSocket::recv doc 5 years ago
Pascal Hertleif 56538ebd91 Improve verbose errors for socket addresses
Moves the point of adding error context to the net::addr module so that
we have access to the raw address input and can include it in the error
message.
5 years ago
Pascal Hertleif aa7d1c27a4
Verbose errors: Apply suggestions
Co-Authored-By: Yoshua Wuyts <yoshuawuyts+github@gmail.com>
5 years ago
Pascal Hertleif e01f07d72a Add context to more errors
cc #569
5 years ago
yjhmelody 76ec9c4563 update doc url 5 years ago
Stjepan Glavina 548733e5d5
Cleanup stream traits (#487)
* Cleanup stream traits

* Fix docs
5 years ago
Stjepan Glavina 3dd59d7056
Refactor the task module (#421)
* Refactor the task module

* Fix clippy warning

* Simplify task-local entries

* Reduce the amount of future wrapping

* Cleanup

* Simplify stealing
5 years ago
Wu Yu Wei ff6a44fcd5 Use once_cell instead of lazy_static (#416)
`once_cell` provides a neat way of initializing lazy singletons without
macro. This PR use `sync::Lazy` to streamline same pattern proposed in
related rust RFC.

Resolve #406
5 years ago
Yoshua Wuyts 20abd5cebf
standardize net docs
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Taiki Endo 2abf5ca891
Deny warnings on CI (#378)
* Deny warnings on CI

* Fix some clippy warnings
5 years ago
Stjepan Glavina ec23632f3e
Cleanup: replace cfg-if with our macros (#361)
* Cleanup: replace cfg-if with our macros

* Prefix macros with cfg_

* Remove #[macro_export] from internal macros
5 years ago
Yoshua Wuyts b4c1c63fd2
task::blocking async closure -> FnOnce
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Stjepan Glavina c890de2c52 Fix failing doc example 5 years ago
Stjepan Glavina cbd458b1db Cleanup ToSocketAddrs, add more net reexports 5 years ago
Yoshua Wuyts 9ab7b1ae6e
Merge pull request #251 from async-rs/blocking-unstable
add an unstable `task::blocking` function
5 years ago
Yoshua Wuyts 647aab819f
impl feedback
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
k-nasa 2460f35768 fix: Remove unnecessary Borrowed
Each implements a Copy trait
5 years ago
Stjepan Glavina edfa2358a4 Re-export IO traits from futures 5 years ago
Stjepan Glavina 2818c7099f Suppress a lint that makes CI fail on windows 5 years ago
Stjepan Glavina 5429c2c0a3 cargo fmt 5 years ago
Stjepan Glavina d25dae5419 Refactor the networking driver 5 years ago
bors[bot] 7c05356ef4
Merge #148
148: Make sure into_raw_fd doesn't close the file descriptor r=stjepang a=yshui

Closes #147 

Co-authored-by: Yuxuan Shui <yshuiv7@gmail.com>
Co-authored-by: yshui <yshuiv7@gmail.com>
5 years ago
yshui 8e2bf24456
Apply suggestions from code review
Co-Authored-By: Stjepan Glavina <stjepang@gmail.com>
5 years ago
Stjepan Glavina 17c95a39d7
More robust file implementation
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Yuxuan Shui 876059cfe0
Make sure ownership is transferred in into_raw_fd
Previously all of the into_raw_fd implementations only returns a copy of
the inner RawFd, while still holding the ownership of the file
descriptor when returning for into_raw_fd. Since `self` is dropped at
the end of into_raw_fd, the returned file descriptor will actually be
closed, render the function unuseable.

The patch makes sure that into_raw_fd actually takes the ownership of
the file descriptor all the way from the inner IoHandle. To achieve
this, I have to use an Option in IoHandle to store the I/O source. It's
not pretty, but I cannot come up with a better way.
5 years ago
Stjepan Glavina bac74c2d7f
Reduce dependency on futures crate (#140)
* Add future::poll_fn

* Replace all uses of poll_fn with the new one

* Remove some uses of futures

* Simplify ReadDir and DirEntry

* Remove some use of futures from File

* Use futures subcrates

* Fix imports in docs

* Remove futures-util dependency

* Remove futures-executor-preview

* Refactor

* Require more features in the futures-preview crate
5 years ago
DCjanus 238a3c882b Implement an async version of ToSocketAddrs (#74)
* Implement an async version of ToSocketAddrs

* fix documentation issue

* genius hack: pretending to be `impl Future`

* replace `std::net::ToSocketAddrs` with `async-std::net::ToSocketAddrs`

* Move unit tests into the tests directory

* Stylistic changes

* Remove re-exports in async_std::net

* fix broken link

* some mirror changes

* remove unnecessary format

* migrate: `std::net::ToSocketAddrs` -> `async_std::net::ToSocketAddrs`

* fix typo(tutorial)

* remove unnecessary type bound

* lifetime for future
5 years ago
Roman Proskuryakov 374f0c9eb8 Refactor TcpStream::connect into resolving loop and TcpStream::connect_to (#119) 5 years ago
Yoshua Wuyts 63ad786768
remove async_await feature gate
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
5 years ago
Andrew Chin 50e69dc765 Fix documention links to docs.rs 5 years ago
Stjepan Glavina 9b3e8b8f26 Use our own Sink/Empty and fix compilation errors 5 years ago
Stjepan Glavina e459bd048e Cleanup and docs 5 years ago
Stjepan Glavina 019c8085f4 Cleanup examples 5 years ago
Stjepan Glavina 9d8ac36813 Rename feature docs.rs to docs 5 years ago
Stjepan Glavina 68d7a9c34e Refactor 5 years ago
Stjepan Glavina a430e27819 Cleanup, docs, fmt 5 years ago
Stjepan Glavina e44451a042 Revamp IO traits and Stream trait 5 years ago
Aleksey Kladov 3ce68814b6 implement FusedStream for net::Incoming 5 years ago
Stjepan Glavina 3f4a56abdc Reformat doc examples 5 years ago
Florian Gilcher 5b0a6269a9
Initial commit 5 years ago