ErLang newbie questions

Sivakumar Krishnasamy ksivakumar@REDACTED
Sat Aug 10 12:00:13 CEST 2002


Hi All,
     I am sorry if all these questions are very basic. I am a newbie to ErLang. Please clarify my questions.

1) I want to use Port driver's callback function in a C Node. To call back this function I need to use port_command/3 BIF from ErLang Node. But I am able to find port_command/2 BIF only. What are arguments in port_command/3 BIF? 

2) I have two ErLang nodes  (For example) Node_A , Node_B. Both these nodes have C Node Interface. 
   
     I have written a ErLang process which sends a message from ErLang process to C Interface program in Node_A, which is then echo'd  back to ErLang process, which in turn send this message to ErLang process in Node_B.
   
   Message communication between these two nodes are normal. But when I disconnect a node (Node_B) and try sending a message to the Node_B from Node_A, it fails by giving proper error. But when the connection is retained back (to Node_B), Node_A sends the old messages, i.e the messages which were send to Node_B, when it was disconnected from Node_A. I think somekind of Message queuing  is happening in Node_A. How to prevent this?.  Is this queuing happening in Node_A's C Interface ?? (or) is it by ErLang process in Node_A?.

3) Why does open_port({spawn,command},[{packet,2},binary]) fails while open_port({spawn,command},[{packet,2}]) succeeds ?. 
  
   Thanks in Advance.

Regards,
Sivakumar Krishnasamy.


   

    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20020810/364f24d5/attachment.htm>


More information about the erlang-questions mailing list