| /webrtc/util/src/conn/ |
| H A D | conn_bridge_test.rs | 16 let n = conn0.send(&MSG1).await?; in test_bridge_normal() localVariable 24 let _ = tx.send(n).await; in test_bridge_normal() 30 let n = rx.recv().await.unwrap(); in test_bridge_normal() localVariable 40 let n = conn0.send(&MSG1).await?; in test_bridge_drop_1st_packet_from_conn0() localVariable 42 let n = conn0.send(&MSG2).await?; in test_bridge_drop_1st_packet_from_conn0() localVariable 50 let _ = tx.send(n).await; in test_bridge_drop_1st_packet_from_conn0() 57 let n = rx.recv().await.unwrap(); in test_bridge_drop_1st_packet_from_conn0() localVariable 67 let n = conn0.send(&MSG1).await?; in test_bridge_drop_2nd_packet_from_conn0() localVariable 77 let _ = tx.send(n).await; in test_bridge_drop_2nd_packet_from_conn0() 104 let _ = tx.send(n).await; in test_bridge_drop_1st_packet_from_conn1() [all …]
|
| H A D | conn_pipe_test.rs | 8 let n = c1.send(&b1).await?; in test_pipe() localVariable 9 assert_eq!(n, 10); in test_pipe() 12 let n = c2.recv(&mut b2).await?; in test_pipe() localVariable 13 assert_eq!(n, 10); in test_pipe() 14 assert_eq!(&b2[..n], &b1[..]); in test_pipe() 17 assert_eq!(n, 10); in test_pipe() 19 assert_eq!(n, 5); in test_pipe() 21 let n = c1.recv(&mut b1).await?; in test_pipe() localVariable 22 assert_eq!(n, 10); in test_pipe() 23 let n = c1.recv(&mut b1).await?; in test_pipe() localVariable [all …]
|
| H A D | conn_bridge.rs | 40 let n = self.recv(buf).await?; in recv_from() localVariable 41 Ok((n, SocketAddr::from_str("0.0.0.0:0")?)) in recv_from() 162 pub async fn drop_offset(&self, id: usize, offset: usize, n: usize) { in drop_offset() 164 queue.drain(offset..offset + n); in drop_offset() 169 pub fn drop_next_nwrites(&self, id: usize, n: usize) { in drop_next_nwrites() 170 self.drop_nwrites[id].store(n, Ordering::SeqCst); in drop_next_nwrites() 175 pub fn reorder_next_nwrites(&self, id: usize, n: usize) { in reorder_next_nwrites() 176 self.reorder_nwrites[id].store(n, Ordering::SeqCst); in reorder_next_nwrites() 190 let mut n = 0; in tick() localVariable 195 n += 1; in tick() [all …]
|
| /webrtc/util/src/buffer/ |
| H A D | buffer_test.rs | 15 assert_eq!(n, 2, "n must be 2"); in test_buffer() 19 assert_eq!(n, 2, "n must be 2"); in test_buffer() 20 assert_eq!(&packet[..n], &[0, 1]); in test_buffer() 29 assert_eq!(n, 3, "n must be 3"); in test_buffer() 32 assert_eq!(n, 3, "n must be 3"); in test_buffer() 36 assert_eq!(n, 3, "n must be 3"); in test_buffer() 57 assert_eq!(&packet[..n], &[3]); in test_buffer() 88 assert_eq!(&p1[..], &p[..n]); in test_wraparound() 97 assert_eq!(&p2[..], &p[..n]); in test_wraparound() 102 assert_eq!(&p3[..], &p[..n]); in test_wraparound() [all …]
|
| H A D | mod.rs | 69 let mut n; in grow() localVariable 72 n = self.tail - self.head; in grow() 76 n = self.data.len() - self.head; in grow() 78 newdata[n..n + self.tail].copy_from_slice(&self.data[..self.tail]); in grow() 79 n += self.tail; in grow() 82 self.tail = n; in grow() 165 let n = end - b.tail; in write() localVariable 167 b.data[tail..end].copy_from_slice(&packet[..n]); in write() 168 b.tail += n; in write() 171 let m = packet.len() - n; in write() [all …]
|
| /webrtc/util/src/fixed_big_int/ |
| H A D | mod.rs | 9 n: usize, field 25 pub(crate) fn new(n: usize) -> Self { in new() 26 let mut chunk_size = (n + 63) / 64; in new() 33 n, in new() 34 msb_mask: if n % 64 == 0 { in new() 37 (1 << (64 - n % 64)) - 1 in new() 44 if n == 0 { in lsh() 47 let n_chunk = (n / 64) as isize; in lsh() 48 let n_n = n % 64; in lsh() 79 if i >= self.n { in bit() [all …]
|
| /webrtc/data/src/data_channel/ |
| H A D | data_channel_test.rs | 202 let n = dc0 in pr_ordered_unordered_test() localVariable 208 let n = dc0 in pr_ordered_unordered_test() localVariable 215 let n = dc0 in pr_ordered_unordered_test() localVariable 352 let n = dc0 in test_data_channel_channel_type_reliable_unordered() localVariable 358 let n = dc0 in test_data_channel_channel_type_reliable_unordered() localVariable 553 bytes_sent += n; in test_stats() 560 bytes_sent += n; in test_stats() 567 bytes_sent += n; in test_stats() 574 bytes_sent += n; in test_stats() 585 bytes_read += n; in test_stats() [all …]
|
| /webrtc/sctp/src/association/ |
| H A D | association_test.rs | 259 let n = s0 in test_assoc_reliable_simple() localVariable 335 let n = s0 in test_assoc_reliable_ordered_reordered() localVariable 344 let n = s0 in test_assoc_reliable_ordered_reordered() localVariable 427 let n = s0 in test_assoc_reliable_ordered_fragmented_then_defragmented() localVariable 494 let n = s0 in test_assoc_reliable_unordered_fragmented_then_defragmented() localVariable 564 let n = s0 in test_assoc_reliable_unordered_ordered() localVariable 573 let n = s0 in test_assoc_reliable_unordered_ordered() localVariable 652 let n = s0 in test_assoc_reliable_retransmission() localVariable 657 let n = s0 in test_assoc_reliable_retransmission() localVariable 730 let n = s0 in test_assoc_reliable_short_buffer() localVariable [all …]
|
| /webrtc/util/src/vnet/conn/ |
| H A D | conn_test.rs | 82 Ok((n, addr)) => (n, addr), in test_udp_conn_send_to_recv_from() 90 assert_eq!(data_rx.len(), n, "should match"); in test_udp_conn_send_to_recv_from() 91 assert_eq!(&data_rx, &buf[..n], "should match"); in test_udp_conn_send_to_recv_from() 100 let n = conn.send_to(&data, dst_addr).await.unwrap(); in test_udp_conn_send_to_recv_from() localVariable 101 assert_eq!(n, data.len(), "should match"); in test_udp_conn_send_to_recv_from() 168 let n = match conn_rx.recv(&mut buf).await { in test_udp_conn_send_recv() localVariable 169 Ok(n) => n, in test_udp_conn_send_recv() 177 assert_eq!(data_rx.len(), n, "should match"); in test_udp_conn_send_recv() 178 assert_eq!(&data_rx, &buf[..n], "should match"); in test_udp_conn_send_recv() 185 let n = conn.send(&data).await.unwrap(); in test_udp_conn_send_recv() localVariable [all …]
|
| /webrtc/util/src/vnet/net/ |
| H A D | net_test.rs | 478 let n = nic.lock().await; in test_net_virtual_dail_eth0() localVariable 518 let n = nic.lock().await; in test_net_virtual_resolver() localVariable 582 Ok((n, addr)) => (n, addr), in test_net_virtual_loopback2() 620 let n = nic.lock().await; in get_ipaddr() localVariable 662 let n = nic.lock().await; in test_net_virtual_end2end() localVariable 677 let n = nic.lock().await; in test_net_virtual_end2end() localVariable 707 Ok((n, _)) => n, in test_net_virtual_end2end() 735 Ok((n, addr)) => (n, addr), in test_net_virtual_end2end() 807 let n = nic.lock().await; in test_net_virtual_two_ips_on_a_nic() localVariable 839 Ok((n, _)) => n, in test_net_virtual_two_ips_on_a_nic() [all …]
|
| /webrtc/util/src/vnet/router/ |
| H A D | router_test.rs | 106 let n = nic.lock().await; in get_ipaddr() localVariable 174 let n = nic.lock().await; in test_router_standalone_add_net() localVariable 216 w.add_net(n).await?; in test_router_standalone_routing() 219 let n = nic.lock().await; in test_router_standalone_routing() localVariable 225 let n = nic.lock().await; in test_router_standalone_routing() localVariable 252 let n = nics[0].lock().await; in test_router_standalone_routing() localVariable 296 w.add_net(n).await?; in test_router_standalone_add_chunk_filter() 318 let n = AtomicUsize::new(0); in test_router_standalone_add_chunk_filter() localVariable 399 w.add_net(n).await?; in delay_sub_test() 551 w.add_net(n).await?; in test_router_one_child() [all …]
|
| /webrtc/rtcp/src/ |
| H A D | util.rs | 43 pub(crate) fn append_nbits_to_uint32(src: u32, n: u32, val: u32) -> u32 { in append_nbits_to_uint32() 44 (src << n) | (val & (0xFFFFFFFF >> (32 - n))) in append_nbits_to_uint32() 48 pub(crate) fn get_nbits_from_byte(b: u8, begin: u16, n: u16) -> u16 { in get_nbits_from_byte() 49 let end_shift = 8 - (begin + n); in get_nbits_from_byte() 67 for (n, p) in tests { in test_get_padding() 69 get_padding_size(n), in test_get_padding()
|
| /webrtc/turn/src/proto/channum/ |
| H A D | channnum_test.rs | 5 let n = ChannelNumber(112); in test_channel_number_string() localVariable 6 assert_eq!(n.to_string(), "112", "bad string {n}, expected 112"); in test_channel_number_string() 40 let n = ChannelNumber(6); in test_channel_number_add_to() localVariable 41 n.add_to(&mut m)?; in test_channel_number_add_to() 51 assert_eq!(num_decoded, n, "Decoded {num_decoded}, expected {n}"); in test_channel_number_add_to()
|
| /webrtc/turn/src/client/binding/ |
| H A D | binding_test.rs | 9 let mut n: u16; in test_binding_manager_number_assignment() localVariable 11 n = m.assign_channel_number(); in test_binding_manager_number_assignment() 12 assert_eq!(MIN_CHANNEL_NUMBER + i, n, "should match"); in test_binding_manager_number_assignment() 17 n = m.assign_channel_number(); in test_binding_manager_number_assignment() 18 assert_eq!(0x7ff0 + i, n, "should match"); in test_binding_manager_number_assignment() 21 n = m.assign_channel_number(); in test_binding_manager_number_assignment() 22 assert_eq!(MIN_CHANNEL_NUMBER, n, "should match"); in test_binding_manager_number_assignment()
|
| /webrtc/webrtc/src/mux/ |
| H A D | mux_test.rs | 59 let n = std::cmp::min(buf.len(), self.data[idx].len()); in recv() localVariable 60 buf[..n].copy_from_slice(&self.data[idx][..n]); in recv() 61 Ok(n) in recv() 117 let n = e.recv(&mut buff).await?; in test_non_fatal_read() localVariable 118 assert_eq!(&buff[..n], expected_data); in test_non_fatal_read() 120 let n = e.recv(&mut buff).await?; in test_non_fatal_read() localVariable 121 assert_eq!(&buff[..n], expected_data); in test_non_fatal_read() 123 let n = e.recv(&mut buff).await?; in test_non_fatal_read() localVariable 124 assert_eq!(&buff[..n], expected_data); in test_non_fatal_read()
|
| /webrtc/srtp/src/ |
| H A D | stream.rs | 61 let n = self.buffer.read(buf, None).await?; in read_rtp() localVariable 62 let mut b = &buf[..n]; in read_rtp() 65 Ok((n, header)) in read_rtp() 74 let n = self.buffer.read(buf, None).await?; in read_rtcp() localVariable 75 let mut b = &buf[..n]; in read_rtcp() 78 Ok((n, header)) in read_rtcp()
|
| /webrtc/media/src/io/h264_reader/ |
| H A D | mod.rs | 160 let n = match self.reader.read(buf) { in read() localVariable 161 Ok(n) => { in read() 162 if n == 0 { in read() 165 n in read() 170 self.read_buffer.extend_from_slice(&buf[0..n]); in read() 189 let n = prefix_buffer.len(); in bit_stream_starts_with_h264prefix() localVariable 190 if n == 0 { in bit_stream_starts_with_h264prefix() 194 if n < 3 { in bit_stream_starts_with_h264prefix() 199 if n == 3 { in bit_stream_starts_with_h264prefix() 232 let n = buffer.len(); in next_nal() localVariable [all …]
|
| /webrtc/turn/examples/ |
| H A D | turn_client_udp.rs | 143 let (n, from) = match pinger_conn_rx.recv_from(&mut buf).await { in do_ping_test() 144 Ok((n, from)) => (n, from), in do_ping_test() 148 let msg = match String::from_utf8(buf[..n].to_vec()) { in do_ping_test() 165 let (n, from) = match relay_conn.recv_from(&mut buf).await { in do_ping_test() 167 Ok((n, from)) => (n, from), in do_ping_test() 170 println!("relay_conn read-loop: {:?} from {}", &buf[..n], from); in do_ping_test() 173 if relay_conn.send_to(&buf[..n], from).await.is_err() { in do_ping_test()
|
| /webrtc/mdns/src/message/ |
| H A D | parser.rs | 183 let mut n = self.header.answers as usize; in all_answers() localVariable 184 if n > 20 { in all_answers() 185 n = 20 in all_answers() 187 let mut a = Vec::with_capacity(n); in all_answers() 237 let mut n = self.header.authorities as usize; in all_authorities() localVariable 238 if n > 10 { in all_authorities() 239 n = 10; in all_authorities() 241 let mut a = Vec::with_capacity(n); in all_authorities() 292 if n > 10 { in all_additionals() 293 n = 10; in all_additionals() [all …]
|
| /webrtc/rtp/src/extension/abs_send_time_extension/ |
| H A D | abs_send_time_extension_test.rs | 36 for (t, n) in &tests { in test_ntp_conversion() 44 let expected = *n as i128; in test_ntp_conversion() 47 panic!("unix2ntp error, expected: {:?}, got: {:?}", ntp, *n,); in test_ntp_conversion() 50 assert_eq!(ntp, *n, "unix2ntp error"); in test_ntp_conversion() 54 for (t, n) in &tests { in test_ntp_conversion() 55 let output = ntp2unix(*n); in test_ntp_conversion()
|
| /webrtc/mdns/src/message/resource/ |
| H A D | txt.rs | 41 let mut n = 0; in unpack() localVariable 42 while n < length { in unpack() 46 if length < n + t.as_bytes().len() + 1 { in unpack() 49 n += t.len() + 1; in unpack()
|
| /webrtc/stun/src/ |
| H A D | xoraddr.rs | 44 let mut n = a.len(); in safe_xor_bytes() localVariable 45 if b.len() < n { in safe_xor_bytes() 46 n = b.len(); in safe_xor_bytes() 48 if dst.len() < n { in safe_xor_bytes() 49 n = dst.len(); in safe_xor_bytes() 51 for i in 0..n { in safe_xor_bytes() 54 n in safe_xor_bytes()
|
| /webrtc/interceptor/src/nack/generator/ |
| H A D | generator_stream.rs | 158 let mut b = &buf[..n]; in read() 162 Ok((n, attr)) in read() 199 for n in nums { in test_generator_stream() 200 let seq = start.wrapping_add(*n); in test_generator_stream() 206 for n in nums { in test_generator_stream() 207 let seq = start.wrapping_add(*n); in test_generator_stream() 213 for n in nums { in test_generator_stream() 214 let seq = start.wrapping_add(*n); in test_generator_stream() 219 *n, in test_generator_stream() 228 for n in nums { in test_generator_stream() [all …]
|
| /webrtc/webrtc/src/track/track_remote/ |
| H A D | mod.rs | 224 let n = std::cmp::min(b.len(), data.len()); in read() localVariable 225 b[..n].copy_from_slice(&data[..n]); in read() 226 self.check_and_update_track(&b[..n]).await?; in read() 228 return Ok((n, attributes)); in read() 238 self.check_and_update_track(&b[..n]).await?; in read() 239 Ok((n, attributes)) in read() 283 let (n, attributes) = self.read(&mut b).await?; in read_rtp() 285 let mut buf = &b[..n]; in read_rtp() 292 let (n, a) = self.read(b).await?; in peek() 298 data.extend(b[..n].to_vec()); in peek() [all …]
|
| /webrtc/interceptor/src/mock/ |
| H A D | mock_stream.rs | 92 Ok((n, _)) => n, in new() 101 let mut b = &buf[..n]; in new() 125 Ok((n, _)) => n, in new() 134 let mut b = &buf[..n]; in new() 269 let n = marshaled.len(); in read() localVariable 270 if n > buf.len() { in read() 274 buf[..n].copy_from_slice(&marshaled); in read() 275 Ok((n, a.clone())) in read() 296 let n = marshaled.len(); in read() localVariable 297 if n > buf.len() { in read() [all …]
|