[erlang-questions] JInterface and node discovery

Per Hedeland per@REDACTED
Wed Dec 13 22:59:08 CET 2006

Mats Cronqvist <mats.cronqvist@REDACTED> wrote:
>Vlad Dumitrescu wrote:
>> On 12/13/06, Mats Cronqvist <mats.cronqvist@REDACTED> wrote:
>>> Vlad Dumitrescu wrote:
>>> > The version of jinterface used in the Erlide project (erlide.sf.net)
>>> > contains a method to query the epmd server for all the registered node
>>> > names.
>>>    that looked very nice! now, for the java-impaired, could you quickly
>>> translate it to erlang? or was it based on some erlang code?
>> Hi,
>> Yes, I could :-)
>   for documentation purposes;


>   is it just me or is the erlang version significantly shorter? :>

There is an even shorter one though:


(or maybe it should be (net_kernel:epmd_module()):names() - there's a
names/1 too btw). The *implementation* of that is somewhat longer than
yours, but then it does handle the case that you don't get the whole
reply in one gen_tcp:recv(), and gives a possibly "nicer" result (you
won't like it though:-).

--Per Hedeland

More information about the erlang-questions mailing list