• Home
  • Raw
  • Download

Lines Matching refs:tcp_stream

138     pub fn new_and_handshake(tcp_stream: &'a mut T) -> Result<Self> {  in new_and_handshake()
140 block_on(tcp_stream.write_exact(TCP_HANDSHAKE_MESSAGE))?; in new_and_handshake()
141 block_on(tcp_stream.read_exact(&mut handshake[..]))?; in new_and_handshake()
143 true => Ok(Self(tcp_stream)), in new_and_handshake()
1015 tcp_stream: &mut impl TcpStream, in run_tcp_session()
1018 run(&mut TcpTransport::new_and_handshake(tcp_stream)?, fb_impl).await in run_tcp_session()
1621 let mut tcp_stream: TestTcpStream = Default::default(); in test_fastboot_tcp() localVariable
1622 tcp_stream.add_input(TCP_HANDSHAKE_MESSAGE); in test_fastboot_tcp()
1624 tcp_stream.add_length_prefixed_input(b"getvar:max-download-size"); in test_fastboot_tcp()
1625 tcp_stream.add_length_prefixed_input( in test_fastboot_tcp()
1628 tcp_stream.add_length_prefixed_input(&download_content[..]); in test_fastboot_tcp()
1629 let _ = block_on(run_tcp_session(&mut tcp_stream, &mut fastboot_impl)); in test_fastboot_tcp()
1636 assert_eq!(tcp_stream.out_queue, VecDeque::from(expected.concat())); in test_fastboot_tcp()
1643 let mut tcp_stream: TestTcpStream = Default::default(); in test_fastboot_tcp_invalid_handshake() localVariable
1644 tcp_stream.add_input(b"ABCD"); in test_fastboot_tcp_invalid_handshake()
1646 block_on(run_tcp_session(&mut tcp_stream, &mut fastboot_impl)).unwrap_err(), in test_fastboot_tcp_invalid_handshake()
1654 let mut tcp_stream: TestTcpStream = Default::default(); in test_fastboot_tcp_packet_size_exceeds_maximum() localVariable
1655 tcp_stream.add_input(TCP_HANDSHAKE_MESSAGE); in test_fastboot_tcp_packet_size_exceeds_maximum()
1656 tcp_stream.add_input(&(MAX_COMMAND_SIZE + 1).to_be_bytes()); in test_fastboot_tcp_packet_size_exceeds_maximum()
1658 block_on(run_tcp_session(&mut tcp_stream, &mut fastboot_impl)).unwrap_err(), in test_fastboot_tcp_packet_size_exceeds_maximum()
1737 let mut tcp_stream: TestTcpStream = Default::default(); in test_continue_run_tcp() localVariable
1738 tcp_stream.add_input(TCP_HANDSHAKE_MESSAGE); in test_continue_run_tcp()
1739 tcp_stream.add_length_prefixed_input(b"continue"); in test_continue_run_tcp()
1740 block_on(run_tcp_session(&mut tcp_stream, &mut fastboot_impl)).unwrap(); in test_continue_run_tcp()