pub fn bind_to_executor(self) -> TcpStream {
        TcpStream {
            stream: unsafe { GlommioStream::from_raw_fd(self.fd) },
        }
    }
/// Binds this `AcceptedTcpStream` to the current executor
///
/// This returns a [`TcpStream`] that can then be used normally
///
/// # Examples
/// ```no_run
/// use glommio::{
///     channels::shared_channel,
///     net::TcpListener,
///     LocalExecutor,
///     LocalExecutorBuilder,
/// };
///
/// let ex = LocalExecutor::default();
/// ex.run(async move {
///     let (sender, receiver) = shared_channel::new_bounded(1);
///     let sender = sender.connect().await;
///
///     let listener = TcpListener::bind("127.0.0.1:0").unwrap();
///
///     let accepted = listener.shared_accept().await.unwrap();
///     sender.try_send(accepted).unwrap();
///
///     let ex1 = LocalExecutorBuilder::new()
///         .spawn(move || async move {
///             let receiver = receiver.connect().await;
///             let accepted = receiver.recv().await.unwrap();
///             let _ = accepted.bind_to_executor();
///         })
///         .unwrap();
///
///     ex1.join().unwrap();
/// });
/// ```
Binds this `AcceptedTcpStream` to the current executor
This returns a [`TcpStream`] that can then be used normally
Binds this ` AcceptedTcpStream ` to the current executor This returns a [ ` TcpStream ` ] that can then be used normally
pub fn bind_to_executor(self) -> TcpStream {
        TcpStream {
            stream: unsafe { GlommioStream::from_raw_fd(self.fd) },
        }
    }
pub fn bind_to_executor ( self ) -> TcpStream { TcpStream { stream : unsafe { GlommioStream :: from_raw_fd ( self . fd ) } , } }
Binds this `AcceptedTcpStream` to the current executor
This returns a [`TcpStream`] that can then be used normally
Binds this ` AcceptedTcpStream ` to the current executor This returns a [ ` TcpStream ` ] that can then be used normally
self
self
examples
```no_run
use glommio::{
channels::shared_channel,
net::TcpListener,
LocalExecutor,
LocalExecutorBuilder,
}.

let ex = LocalExecutor::default();
ex.run(async move {
let (sender, receiver) = shared_channel::new_bounded(1);
let sender = sender.connect().await.



let accepted = listener.shared_accept().await.unwrap();
sender.try_send(accepted).unwrap().

let ex1 = LocalExecutorBuilder::new()
.spawn(move || async move {
let receiver = receiver.connect().await;
let accepted = receiver.recv().await.unwrap();
let _ = accepted.bind_to_executor();
})
.unwrap().


` ` ` no_run use glommio :: { channels :: shared_channel net :: TcpListener LocalExecutor LocalExecutorBuilder } . let ex = LocalExecutor :: default () ; ex . run ( async move { let ( sender receiver ) = shared_channel :: new_bounded ( 1 ) ; let sender = sender . connect () . await . let accepted = listener . shared_accept () . await . unwrap () ; sender . try_send ( accepted ) . unwrap () . let ex1 = LocalExecutorBuilder :: new () . spawn ( move || async move { let receiver = receiver . connect () . await ; let accepted = receiver . recv () . await . unwrap () ; let _ = accepted . bind_to_executor () ; } ) . unwrap () .