Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getter function for the send_addr field of the Rtc struct #260

Open
biceneutron opened this issue Aug 7, 2023 · 2 comments
Open

Getter function for the send_addr field of the Rtc struct #260

biceneutron opened this issue Aug 7, 2023 · 2 comments

Comments

@biceneutron
Copy link
Contributor

First of all, this is a pretty cool project, thanks for all the efforts!

I'm currently using this in our project, and I need to access the send_addr field of the Rtc struct. Is it possible to add a simple getter like

pub fn send_addr(&self) -> Option<(SocketAddr, SocketAddr)> {
    if let Some(send_addr) = &self.send_addr {
        return Some((send_addr.source, send_addr.destination));
    }
    None
}

to the Rtc struct?

@biceneutron biceneutron changed the title Getter function for the send_addr field of Rtc Getter function for the send_addr field of the Rtc struct Aug 7, 2023
@algesten
Copy link
Owner

algesten commented Aug 7, 2023

Hello! Thanks!

I suppose current_send_addr() or something like that.

I guess grabbing it from the outgoing packets means there's risk you get a probe packet for some ICE candidate?

@biceneutron
Copy link
Contributor Author

Yeah, it would be nicer if we can get it directly from Rtc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants