MCPcopy Create free account
hub / github.com/Rustixir/darkbird / register

Method register

src/darkbird/router.rs:256–267  ·  view source on GitHub ↗

register new channel to router

(&self, sender: Sender<Msg>)

Source from the content-addressed store, hash-verified

254
255 /// register new channel to router
256 pub async fn register(&self, sender: Sender<Msg>) -> Result<(), SessionResult> {
257 let res = self.sender.send_timeout(Request::Register(sender), TIMEOUT).await;
258 match res {
259 Ok(_) => Ok(()),
260 Err(e) => {
261 match e {
262 SendTimeoutError::Timeout(_) => Err(SessionResult::Timeout),
263 SendTimeoutError::Closed(_) => Err(SessionResult::Closed),
264 }
265 }
266 }
267 }
268
269
270 /// dispatch msg by router

Callers 2

subscribeMethod · 0.80
subscribeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected