pub async fn on_open(&self, f: OnOpenHdlrFn) {
        {
            let mut handler = self.on_open_handler.lock().await;
            *handler = Some(f);
        }

        if self.ready_state() == RTCDataChannelState::Open {
            self.do_open().await;
        }
    }
/// on_open sets an event handler which is invoked when
/// the underlying data transport has been established (or re-established).
on_open sets an event handler which is invoked when
the underlying data transport has been established (or re-established).
on_open sets an event handler which is invoked when the underlying data transport has been established ( or re - established ) .
pub async fn on_open(&self, f: OnOpenHdlrFn) {
        {
            let mut handler = self.on_open_handler.lock().await;
            *handler = Some(f);
        }
        if self.ready_state() == RTCDataChannelState::Open {
            self.do_open().await;
        }
    }
pub async fn on_open ( & self , f : OnOpenHdlrFn ) { { let mut handler = self . on_open_handler . lock ( ) . await ; * handler = Some ( f ) ; } if self . ready_state ( ) == RTCDataChannelState :: Open { self . do_open ( ) . await ; } }
on_open sets an event handler which is invoked when
the underlying data transport has been established (or re-established).
on_open sets an event handler which is invoked when the underlying data transport has been established ( or re - established ) .
&self
f
OnOpenHdlrFn