Problem in erlang interface
maruthavanan s
maruthavanan_s@REDACTED
Thu Mar 10 07:13:29 CET 2005
hi
One small doubt i am trying to connect erlang node as server and C node as
client. Is this possible in erlang using the following code.
Thanks
maruthavanan
>From: "maruthavanan s" <maruthavanan_s@REDACTED>
>To: erlang-questions@REDACTED
>Subject: Re: Problem in erlang interface
>Date: Thu, 10 Mar 2005 05:30:52 +0000
>
>hi
>
>i am trying to use ei as you said. but i still have some problems...i am
>using windows XP with SP2 we have a large number of message to be passed to
>erlang and receive from erlang.
>
><CODE>
>char *cookie="secretcookie";
>char *nodename="enode";
>char *Node;int loop=1;
>if (ei_connect_init(&ec, nodename, cookie, id_number) < 0)
>{
>}
>Node=ei_thisnodename(&ec);
>if ((sockfd = ei_connect(&ec,Node)) < 0)
>{
> printf("ERROR: erl_connect failed");
> exit(0);
>}
>printf("Connection established...\n");
>while (loop)
>{
> ei_x_buff x;
> ei_x_new_with_version(&x);
> got=ei_xreceive_msg(sockfd,&msg,&x);
>}
>
>Executing the above code we are able to get success in ei_connect and we
>are able to get a non-zero 'sockfd' value
>but immediately after connection in while loop ei_xreceive_msg() returns an
>ERL_ERROR value
>
>what could be the reason for this.
>Is any thing missing on the above code
>
>Thanks
>Maruthavanan.
>
>_________________________________________________________________
>Dont just search. Find. Check out the new MSN Search!
>http://search.msn.click-url.com/go/onm00200636ave/direct/01/
>
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the erlang-questions
mailing list