I am using a port to communicate between c and erlang, as described in Joe Armstrong's excellent book, and in this tutorial: <a href="http://www.erlang.org/doc/tutorial/c_port.html#id63121" style="white-space:pre-wrap">http://www.erlang.org/doc/tutorial/c_port.html#id63121</a><div>
<br></div><div>So far, the traffic between the two has been pretty small: typically a hundred bytes or so at a time. </div><div><br></div><div>But now I need to (occasionally) send a large block of binary data from c to erlang: up to 1 meg. <br>
<div><div><br></div><div>How should I handle such large blocks of binary data? Is there anything wrong with increasing the size of the buffer (called buf in the tutorial mentioned above) to 1 meg? </div><div><br></div><div>
Is there a better way of doing this? (NB I am using a port, rather than a port-driver (in which the c-code is linked directly to the erlang code)).</div><div><br></div><div>thanks,</div><div>Richard Evans</div>
</div></div>