torrust-actix 4.2.3

A rich, fast and efficient Bittorrent Tracker.
1
2
3
4
5
6
7
8
9
10
11
12
13
use crate::common::structs::compressed_bytes::CompressedBytes;
use crate::tracker::structs::rtc_data::RtcData;

impl RtcData {
    pub fn new(sdp_offer: Option<&str>) -> Self {
        RtcData {
            sdp_offer: sdp_offer.map(CompressedBytes::compress),
            sdp_answer: None,
            connection_status: "pending".to_string(),
            pending_answers: Vec::new(),
        }
    }
}