Skip to content

Expose a way to get own PeerId asynchronously #511

Description

@teohhanhui

We already have id_rx in WebRtcSocket. Unfortunately it's not being exposed in any way, other than through a sync wrapper (WebRtcSocket::id method).

This is a problem for async code, because it means they'd be forced to poll on an interval until they get their own PeerId.

For example, there's no way for me to implement this cleanly here:

https://github.com/teohhanhui/cyclers/blob/ab045460d1af49d6f2abc74a637d181be58fbf85/crates/cyclers/src/driver/webrtc.rs#L197-L200

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions