<div>A client would call gen_server:call(ircclient, {nick, ale}) to set the nickname for example.<br clear="all"></div><div>The "Erlang Way" is said to be to export actual functions (setnick, getnick, ...) from the gen_server module public API, and have those functions do the gen_server calls. This means that you can change the gen_server message format without breaking compatibility.</div>
<div> </div><div>Also, for synchronous calls (where you want the status), waiting the necessary amount of time is pretty much what you expect to do. You *can* make arrangements to use cast, and pass in a respond-to-PID parameter as part of the request, but in most cases, that adds significant extra complexity for very little benefit.</div>
<div> </div><div>Note that gen_server:call also takes a timeout parameter -- it defaults to 5,000 milliseconds, so if the gen_server is "wedged" then the timeout will kick in.</div><div> </div><div>Sincerely,</div>
<div> </div><div>jw</div><div><br>--<br>Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable. <br>
<br>
</div>