hub.router
timeouts
-- returns shared timer. See timeouts docsloopback
-- MessagePort based local channel. See code/channel.jsyrouter_ctx
-- Shared context for target packets. Extensible by plugins.
-
addDynamic(id_route, route : function, opt) : [route, bound removeRoute]
alias foraddPeer()
oraddRoute()
depending onroute
argument. -
addPeer(id_route, channel, opt) : [route, bound removeRoute]
composedaddRoute()
-
addRoute(id_route, route : function, opt) : {route : function, cancel: bound removeRoute}
-
removeRoute(id_route) : Boolean
orremoveRoute({id_route}) : Boolean
-
hasRoute(id_route) : Boolean
-
getRoute(id_route) : route function
-
dispatch(pkt, channel) : Promise
-
resolveRoute(id_route, allowDiscover, allowUpstream) : route function
-
publishRoute(route)
-
setUpstream(upstream, opt)
-
discoverRoute()
-- see plugins/discover -
ref()
andunref()