Problem in erlang interface

maruthavanan s maruthavanan_s@REDACTED
Thu Mar 10 06:30:52 CET 2005


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.

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




More information about the erlang-questions mailing list