[erlang-questions] JInterface and node discovery
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?
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions