Module sbroker_ask_r

This modules provides utility functions for messaging a process calling sbroker:ask/1 on a broker.

Description

This modules provides utility functions for messaging a process calling sbroker:ask/1 on a broker. The process is looked up by calling sbroker:ask_r/1. If sbroker:ask_r/1 returns {drop, SojournTime} then no process is found.

This module can be used with via names. For example gen_server:call({via, sbroker_ask_r, Broker}, hello) will make a gen_server call to a process calling sbroker:ask/1 on broker Broker.

Function Index

send/2Lookup the pid of a process calling sbroker:ask/1 on sbroker Broker and send Request to it.
whereis_name/1Lookup the pid of a process calling sbroker:ask/1 on sbroker Broker.

Function Details

send/2

send(Broker, Request) -> ok

Lookup the pid of a process calling sbroker:ask/1 on sbroker Broker and send Request to it.

This functions exits if sbroker:ask_r/1 returns {drop, SojournTime}.

whereis_name/1

whereis_name(Broker) -> Pid | undefined

Lookup the pid of a process calling sbroker:ask/1 on sbroker Broker. Returns Pid if sbroker:ask_r/1 returns {go, Ref, Pid, SojournTime}, and undefined on {drop, SojournTime}.


Generated by EDoc, Jan 28 2015, 17:16:35.