| /webrtc/dtls/src/handshake/handshake_cache/ |
| H A D | handshake_cache_test.rs | 13 data: vec![0x00], in test_handshake_cache_single_push() 31 data: vec![0x00], in test_handshake_cache_single_push() 38 data: vec![0x01], in test_handshake_cache_single_push() 45 data: vec![0x02], in test_handshake_cache_single_push() 78 data: vec![0x02], in test_handshake_cache_single_push() 85 data: vec![0x00], in test_handshake_cache_single_push() 92 data: vec![0x01], in test_handshake_cache_single_push() 125 data: vec![0x00], in test_handshake_cache_single_push() 132 data: vec![0x01], in test_handshake_cache_single_push() 139 data: vec![0x01], in test_handshake_cache_single_push() [all …]
|
| /webrtc/dtls/src/handshake/ |
| H A D | handshake_message_server_key_exchange.rs | 60 let mut data = vec![]; in unmarshal() localVariable 61 reader.read_to_end(&mut data)?; in unmarshal() 64 let psk_length = ((data[0] as u16) << 8) | data[1] as u16; in unmarshal() 81 if data[1..].len() < 2 { in unmarshal() 85 let named_curve = (((data[1] as u16) << 8) | data[2] as u16).into(); in unmarshal() 86 if data.len() < 4 { in unmarshal() 92 if data.len() < offset { in unmarshal() 96 if data.len() <= offset { in unmarshal() 102 if data.len() <= offset { in unmarshal() 108 if data.len() < offset + 2 { in unmarshal() [all …]
|
| H A D | handshake_message_client_key_exchange.rs | 47 let mut data = vec![]; in unmarshal() localVariable 48 reader.read_to_end(&mut data)?; in unmarshal() 51 let psk_length = ((data[0] as u16) << 8) | data[1] as u16; in unmarshal() 52 if data.len() == psk_length as usize + 2 { in unmarshal() 54 identity_hint: data[2..].to_vec(), in unmarshal() 59 let public_key_length = data[0] as usize; in unmarshal() 60 if data.len() != public_key_length + 1 { in unmarshal() 66 public_key: data[1..].to_vec(), in unmarshal()
|
| /webrtc/util/src/buffer/ |
| H A D | mod.rs | 18 data: Vec<u8>, field 46 2 * self.data.len() in grow() 48 5 * self.data.len() / 4 in grow() 63 if newsize <= self.data.len() { in grow() 76 n = self.data.len() - self.head; in grow() 83 self.data = newdata; in grow() 107 data: vec![], in new() 152 if b.tail >= b.data.len() { in write() 157 b.data[tail] = packet.len() as u8; in write() 159 if b.tail >= b.data.len() { in write() [all …]
|
| /webrtc/mdns/src/message/ |
| H A D | name.rs | 12 pub data: String, field 18 write!(f, "{}", self.data) in fmt() 23 pub fn new(data: &str) -> Result<Self> { in new() 24 if data.len() > NAME_LEN { in new() 28 data: data.to_owned(), in new() 46 let data = self.data.as_bytes(); in pack() localVariable 49 if data.is_empty() || data[data.len() - 1] != b'.' { in pack() 54 if data.len() == 1 && data[0] == b'.' { in pack() 61 for i in 0..data.len() { in pack() 63 if data[i] == b'.' { in pack() [all …]
|
| /webrtc/examples/examples/data-channels-detach-create/ |
| H A D | README.md | 1 # data-channels-detach-create 3 data-channels-detach-create is an example that shows how you can detach a data channel. 4 This allows direct access the the underlying [webrtc-rs/data](https://github.com/webrtc-rs/data). 6 The example mirrors the data-channels-create example. 11 cargo build --example data-channels-detach-create 16 The example can be used in the same way as the [Data Channels Create](data-channels-create) example.
|
| /webrtc/turn/src/proto/chandata/ |
| H A D | chandata_test.rs | 6 data: vec![1, 2, 3, 4], in test_channel_data_encode() 33 data: vec![1, 2, 3], in test_channel_data_equal() 38 data: vec![1, 2, 3], in test_channel_data_equal() 47 data: vec![1, 2, 3], in test_channel_data_equal() 52 data: vec![1, 2, 3], in test_channel_data_equal() 66 data: vec![1, 2, 3], in test_channel_data_equal() 134 data: vec![1, 2, 3, 4], in test_channel_data_reset() 170 let mut data = vec![]; in test_chrome_channel_data() localVariable 179 data.push(b); in test_chrome_channel_data() 184 for packet in data { in test_chrome_channel_data() [all …]
|
| /webrtc/examples/examples/data-channels-create/ |
| H A D | README.md | 1 # data-channels-create 3 data-channels-create is a WebRTC.rs application that shows how you can send/recv DataChannel messag… 7 ### Build data-channels-create 10 cargo build --example data-channels-create 13 ### Open data-channels-create example page 17 ### Run data-channels-create 19 Just run `data-channels-create`. 21 ### Input data-channels-create's SessionDescription into your browser 23 Copy the text that `data-channels-create` just emitted and copy into first text area of the jsfiddl… 29 ### Input browser's SessionDescription into data-channels-create [all …]
|
| /webrtc/dtls/src/ |
| H A D | application_data.rs | 13 pub data: Vec<u8>, field 22 self.data.len() in size() 26 writer.write_all(&self.data)?; in marshal() 32 let mut data: Vec<u8> = vec![]; in unmarshal() localVariable 33 reader.read_to_end(&mut data)?; in unmarshal() 35 Ok(ApplicationData { data }) in unmarshal()
|
| /webrtc/examples/examples/data-channels/ |
| H A D | README.md | 1 # data-channels 3 data-channels is a WebRTC.rs application that shows how you can send/recv DataChannel messages from… 7 ### Build data-channels 10 cargo build --example data-channels 13 ### Open data-channels example page 17 ### Run data-channels, with your browsers SessionDescription as stdin 23 Run `echo $BROWSER_SDP | ./target/debug/examples/data-channels` 28 1. Run `./target/debug/examples/data-channels < my_file` 30 ### Input data-channels's SessionDescription into your browser 32 Copy the text that `data-channels` just emitted and copy into second text area
|
| /webrtc/examples/ |
| H A D | Cargo.toml | 48 name = "data-channels" 49 path = "examples/data-channels/data-channels.rs" 53 name = "data-channels-close" 54 path = "examples/data-channels-close/data-channels-close.rs" 58 name = "data-channels-create" 59 path = "examples/data-channels-create/data-channels-create.rs" 63 name = "data-channels-detach" 64 path = "examples/data-channels-detach/data-channels-detach.rs" 69 path = "examples/data-channels-detach-create/data-channels-detach-create.rs" 73 name = "data-channels-flow-control" [all …]
|
| /webrtc/examples/examples/data-channels-detach/ |
| H A D | README.md | 1 # data-channels 3 data-channels is a WebRTC.rs application that shows how you can send/recv DataChannel messages from… 7 ### Build data-channels-detach 10 cargo build --example data-channels-detach 13 ### Open data-channels-detach example page 17 ### Run data-channels-detach, with your browsers SessionDescription as stdin 23 Run `echo $BROWSER_SDP | ./target/debug/examples/data-channels-detach` 28 1. Run `./target/debug/examples/data-channels-detach < my_file` 30 ### Input data-channels-detach's SessionDescription into your browser 32 Copy the text that `data-channels` just emitted and copy into second text area
|
| /webrtc/examples/examples/data-channels-flow-control/ |
| H A D | README.md | 1 # data-channels-flow-control 15 Send or SendText methods are called on DataChannel to send data to the connected peer. 16 The methods return immediately, but it does not mean the data was actually sent onto 19 When you have a large amount of data to send, it is an application's responsibility to 23 The rate you wish to send data might be much higher than the rate the data channel can 25 application to pace the amount of data to be pushed into the data channel. 37 | | data | | 44 connection, and data channel (label: "data"). 46 Once the data channel is successfully opened, requester will start sending a series of 52 $ cargo run --release --example data-channels-flow-control [all …]
|
| /webrtc/data/ |
| H A D | README.md | 6 <a href="https://github.com/webrtc-rs/data/actions"> 7 <img src="https://github.com/webrtc-rs/data/workflows/cargo/badge.svg"> 9 <a href="https://codecov.io/gh/webrtc-rs/data"> 10 <img src="https://codecov.io/gh/webrtc-rs/data/branch/main/graph/badge.svg"> 12 <a href="https://deps.rs/repo/github/webrtc-rs/data"> 13 <img src="https://deps.rs/repo/github/webrtc-rs/data/status.svg"> 15 <a href="https://crates.io/crates/webrtc-data"> 16 <img src="https://img.shields.io/crates/v/webrtc-data.svg"> 18 <a href="https://docs.rs/webrtc-data"> 19 <img src="https://docs.rs/webrtc-data/badge.svg">
|
| /webrtc/examples/examples/data-channels-close/ |
| H A D | README.md | 1 # data-channels-close 2 data-channels-close is a variant of the data-channels example that allow playing with the life cycl…
|
| /webrtc/media/src/io/h264_writer/ |
| H A D | mod.rs | 15 fn is_key_frame(data: &[u8]) -> bool { in is_key_frame() 16 if data.len() < 4 { in is_key_frame() 19 let word = u32::from_be_bytes([data[0], data[1], data[2], data[3]]); in is_key_frame()
|
| /webrtc/media/src/io/sample_builder/ |
| H A D | sample_sequence_location_test.rs | 28 let mut data: Vec<Option<u16>> = vec![None; u16::MAX as usize + 1]; in test_sample_sequence_location_range() localVariable 30 data[65533] = Some(65533); in test_sample_sequence_location_range() 31 data[65535] = Some(65535); in test_sample_sequence_location_range() 32 data[0] = Some(0); in test_sample_sequence_location_range() 33 data[2] = Some(2); in test_sample_sequence_location_range() 39 let reconstructed: Vec<_> = s.range(&data).map(|x| x.cloned()).collect(); in test_sample_sequence_location_range()
|
| /webrtc/examples/examples/ |
| H A D | README.md | 22 - [x] [Data Channels](data-channels): The data-channels example shows how you can send/recv DataCha… 23 …data-channels-create): Example data-channels-create shows how you can send/recv DataChannel messag… 24 …nnels Close](data-channels-close): Example data-channels-close is a variant of data-channels that … 25 - [x] [Data Channels Detach](data-channels-detach): The data-channels-detach example shows how you … 26 …data-channels-detach-create): Example data-channels-detach-create shows how you can send/recv Data… 27 - [x] [Data Channels Flow Control](data-channels-flow-control): Example data-channels-flow-control …
|
| /webrtc/turn/src/proto/ |
| H A D | chandata.rs | 26 pub data: Vec<u8>, // can be subslice of Raw field 33 self.data == other.data && self.number == other.number in eq() 42 self.data.clear(); in reset() 49 self.raw.extend_from_slice(&self.data); in encode() 75 self.data = buf[CHANNEL_DATA_HEADER_SIZE..CHANNEL_DATA_HEADER_SIZE + l].to_vec(); in decode() 90 .copy_from_slice(&(self.data.len() as u16).to_be_bytes()); in write_header()
|
| /webrtc/rtcp/src/payload_feedbacks/picture_loss_indication/ |
| H A D | picture_loss_indication_test.rs | 56 for (name, mut data, want, want_error) in tests { in test_picture_loss_indication_unmarshal() 57 let got = PictureLossIndication::unmarshal(&mut data); in test_picture_loss_indication_unmarshal() 118 let mut data = got.ok().unwrap(); in test_picture_loss_indication_roundtrip() localVariable 119 let actual = PictureLossIndication::unmarshal(&mut data) in test_picture_loss_indication_roundtrip() 147 for (name, mut data, header) in tests { in test_picture_loss_indication_unmarshal_header() 148 let pli = PictureLossIndication::unmarshal(&mut data)?; in test_picture_loss_indication_unmarshal_header()
|
| /webrtc/mdns/src/message/resource/ |
| H A D | opt.rs | 22 pub data: Vec<u8>, field 30 self.code, self.data in fmt() 55 msg = pack_uint16(msg, opt.data.len() as u16); in pack() 56 msg = pack_bytes(msg, &opt.data); in pack() 73 data: vec![0; l as usize], in unpack() 78 opt.data.copy_from_slice(&msg[off..off + l as usize]); in unpack()
|
| /webrtc/dtls/src/crypto/ |
| H A D | padding.rs | 21 fn unpad(data: &[u8]) -> Result<&[u8], UnpadError> { in unpad() 22 let padding_length = data.last().copied().unwrap_or(1) as usize; in unpad() 23 if padding_length + 1 > data.len() { in unpad() 27 let padding_begin = data.len() - padding_length - 1; in unpad() 29 if data[padding_begin..data.len() - 1] in unpad() 36 Ok(&data[0..padding_begin]) in unpad()
|
| /webrtc/dtls/src/record_layer/ |
| H A D | record_layer_test.rs | 54 for (name, data, wanted, wanted_err) in tests { in test_udp_decode() 55 let dtls_pkts = unpack_datagram(&data); in test_udp_decode() 97 for (name, data, want) in tests { in test_record_layer_round_trip() 98 let mut reader = BufReader::new(data.as_slice()); in test_record_layer_round_trip() 112 data, data2, in test_record_layer_round_trip()
|
| /webrtc/media/src/ |
| H A D | lib.rs | 23 pub data: Bytes, field 74 data: Bytes::new(), in default() 87 if self.data != other.data { in eq()
|
| /webrtc/rtcp/src/payload_feedbacks/full_intra_request/ |
| H A D | full_intra_request_test.rs | 94 for (name, mut data, want, want_error) in tests { in test_full_intra_request_unmarshal() 95 let got = FullIntraRequest::unmarshal(&mut data); in test_full_intra_request_unmarshal() 164 let mut data = got.ok().unwrap(); in test_full_intra_request_round_trip() localVariable 165 let actual = FullIntraRequest::unmarshal(&mut data) in test_full_intra_request_round_trip() 193 for (name, mut data, want) in tests { in test_full_intra_request_unmarshal_header() 194 let result = FullIntraRequest::unmarshal(&mut data); in test_full_intra_request_unmarshal_header()
|