[erlang-questions] Is there size limit for socket buffer?
Thu Jun 19 05:12:07 CEST 2008
I assume you mean 1492 bytes, not bits. You don't show how you opened the
socket, or say what happens after 1492 bytes, so I'll assume it was opened
in passive binary mode and you only did one read.
If these assumptions are correct, you need to read the socket in a loop,
appending the data to a binary, until all the data has been received. How do
you know when all the data has been received? You need a protocol of some
sort. It could be as simple as expecting the first 4 bytes to hold the
length of the data (not very reliable), or something like
Hope this helps.
2008/6/18 aicean <>:
> I'm use socket receive data from other program.When data size is over 1492
> bit,I can't get any the remaining data.
> Any one has a clue?
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions