SHARE
TWEET

Untitled

a guest Sep 18th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn connections(address: SocketAddr, config Config) -> Box<impl Stream<Item = impl Sink, Error = Error> {
  2.     let listener = TcpListener::bind(&address).unwrap();
  3.  
  4.     Box::new(listener.incoming().map(move |socket| {
  5.         Framed::new(
  6.             socket,
  7.             IrcCodec::new(config.encoding()).expect("Can't connect")
  8.         )
  9.     }))
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top