You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_tcp.rs
    path of file: ./repos/rio/corcovado/test
    
    the code of the file until where you have to start completion: // use std::cmp;
// use std::io;
// use std::io::prelude::*;
// use std::net;
// use std::sync::mpsc::channel;
// use std::thread;
// use std::time::Duration;

// use net2::{self, TcpStreamExt};

// use iovec::IoVec;
// use corcovado::net::{TcpListener, Tc
    
// fn write_bufs() {
//     const N: usize = 16 * 1024 * 1024;

//     let l = net::TcpListener::bind("127.0.0.1:0").unwrap();
//     let addr = l.local_addr().unwrap();

//     let t = thread::spawn(move || {
//         let mut s = l.accept().unwrap().0;
//         let mut b = [0; 1024];
//         let mut amt = 0;
//         while amt < N {
//             for byte in b.iter_mut() {
//                 *byte = 0;
//             }
//             let n = s.read(&mut b).unwrap();
//             amt += n;
//             for byte in b[..n].iter() {
//                 assert_eq!(*byte, 1);
//             }
//         }
//     });

//     let poll = Poll::new().unwrap();
//     let mut events = Events::with_capacity(128);
//     let s = TcpStream::connect(&addr).unwrap();
//     poll.register(&s, Token(1), Ready::writable(), PollOpt::level())
//         .unwrap();

//     let b1 = &[1; 10][..];
//     let b2 = &[1; 383][..];
//     let b3 = &[1; 28][..];
//     let b4 = &[1; 8][..];
//     let b5 = &[1; 128][..];
//     let b: [&IoVec; 5] = [b1.into(), b2.into(), b3.into(), b4.into(), b5.into()];

//     let mut so_far = 0;
//     while so_far < N {
//         poll.poll(&mut events, None).unwrap();

//         match s.write_bufs(&b) {
//             Ok(n) => so_far += n,
//             Err(e) => assert_eq!(e.kind(), io::ErrorKind::WouldBlock),
//         }
//     }

//     t.join().unwrap();
// }