[erlang-questions] Node name for erl_connect(nodename)

J Bhanot <>
Wed Jan 30 15:16:40 CET 2008


Hi,

I am using putty to connect to my linux server....am also runnig MGC 
(sample application in Megaco) which is listening on the port of linux 
server...

Now i have written a small program in C which uses erl_interface...

[code]

#include <stdio.h>
//#include <inet.h>
#include <erl_interface.h>
#include <ei.h>


main()
{
printf("Heloo World\n");

 erl_init(NULL,0);

//int identification_number = 99;
//int creation=1;
//char *cookie="a secret cookie string"; /* An example */

if (!erl_connect_init(17, "samplecookiestring...", 0))
  erl_err_quit("<ERROR> when initializing !");

int sockfd;
char *nodename=""; /* An example */
//char *nodename="127.0.0.1"; /* An example */
if ((sockfd = erl_connect(nodename)) < 0)
{

printf("in\n");
erl_err_quit("ERROR: erl_connect failed");
}
else
{
printf("got the conn");
}
}

[/code]

I am trying to connect to erlang node i.e. running MGC using this....(i 
hope my understanding is right here)

but i am really confused about the node name to be given in 
erl_connect(nodename)

I have tried given it 127.0.0.1....also 127.0.0.1...also 
127.0.01:2944(port on which MGC is listeniing)

but not able to connect it and getting the error 

ERROR: erl_connect failed

Any clues on that..

Thanks,
jb
____________________________________________
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080130/5a578652/attachment.html>


More information about the erlang-questions mailing list