[erlang-questions] JInterface and node discovery

Vlad Dumitrescu vladdu55@REDACTED
Wed Dec 13 14:24:23 CET 2006


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 :-)

It's a matter of sending the request to epmd
    Req = <<1, 110>>
and then parsing the result
    <<_,_,_,_,B2/binary>> = Response,
    Ns = binary_to_list(B2),
    NameList = string:tokens(Ns, "\n")

I skipped the details of connecting to the TCP port.

regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061213/9e332eb9/attachment.htm>


More information about the erlang-questions mailing list