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: closing.rs
    path of file: ./repos/veloren/network/tests
    
    the code of the file until where you have to start completion: #![feature(assert_matches)]
//! How to
    
fn stream_send_first_then_receive() {
    // recv should still be possible even if stream got closed if they are in queue
    let (_, _) = helper::setup(false, 0);
    let (r, _n_a, _p_a, s1_a, _n_b, _p_b, mut s1_b) = network_participant_stream(tcp());

    s1_a.send(1u8).unwrap();
    s1_a.send(42).unwrap();
    s1_a.send("3rdMessage").unwrap();
    drop(s1_a);
    std::thread::sleep(SLEEP_EXTERNAL);
    assert_eq!(r.block_on(s1_b.recv()), Ok(1u8));
    assert_eq!(r.block_on(s1_b.recv()), Ok(42));
    assert_eq!(r.block_on(s1_b.recv()), Ok("3rdMessage".to_string()));
    assert_eq!(s1_b.send("Hello World"), Err(StreamError::StreamClosed));
}