gen_tcp bug ?
Mon Jun 13 14:55:18 CEST 2005
On 2005-06-13 13:27, Claes Wikstrom wrote:
> Very wrong, all reads from "slow devices" for example
> network sockets can always return less than requested.
> That's the way sockets work.
you are correct. i can live with a c like behaviour for recv/2.
but i still think it is ok to have a recv/1 that gives me all available
bytes and a recv/2 that gives me the right amount or an error. the
latter to be used when only the right amount is of interest (ie, too few
bytes will not be of any use, so i do not need to see them). imho.
More information about the erlang-questions