long {packet,1} packets

Thomas Lindgren thomasl_erlang@REDACTED
Tue Dec 7 15:10:29 CET 2004


This occurs in R9C2 and R10B1. It might even be
well-known.

If I send a 256-byte binary on a {packet,1} socket,
what arrives is an empty binary << >>. Apparently, the
length is set to len & 0xff. The gen_tcp:send/2
returns ok.

However, I think the correct behaviour when the
sending socket realizes it can't correctly format a
packet would be for it to instead return {error,
emsgsize} or some other useful error indicator.

(Not being a socket guru, I'll warmly leave the
precise error code(s) to someone else :-)

Best,
Thomas






		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail



More information about the erlang-bugs mailing list