Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn connections(address: SocketAddr, config Config) -> Box<impl Stream<Item = impl Sink, Error = Error> {
- let listener = TcpListener::bind(&address).unwrap();
- Box::new(listener.incoming().map(move |socket| {
- Framed::new(
- socket,
- IrcCodec::new(config.encoding()).expect("Can't connect")
- )
- }))
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement