mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-07 00:00:08 +02:00
Document Handle::default() behavior (#359)
This commit is contained in:
@@ -159,6 +159,7 @@ impl TcpListener {
|
||||
///
|
||||
/// Finally, the `handle` argument is the event loop that this listener will
|
||||
/// be bound to.
|
||||
/// Use `Handle::default()` to lazily bind to an event loop, just like `bind` does.
|
||||
///
|
||||
/// The platform specific behavior of this function looks like:
|
||||
///
|
||||
|
||||
@@ -69,8 +69,7 @@ impl TcpStream {
|
||||
///
|
||||
/// This function will convert a TCP stream created by the standard library
|
||||
/// to a TCP stream ready to be used with the provided event loop handle.
|
||||
/// The stream returned is associated with the event loop and ready to
|
||||
/// perform I/O.
|
||||
/// Use `Handle::default()` to lazily bind to an event loop, just like `connect` does.
|
||||
pub fn from_std(stream: net::TcpStream, handle: &Handle)
|
||||
-> io::Result<TcpStream>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user