UDP over v6: payload truncated at 1024 bytes

Peter Lund peter@REDACTED
Tue Apr 6 11:52:56 CEST 2004

Yes, that is true. When I implemented (parts of) the SMPP
protocol the length indicator was 4 bytes, but the VALUE
differed by 4 between SMPP and gen_tcp. That was why I was
not able to use the {packet,N} option.

I think gen_tcp gives the value as the size of the following
packet (after the indicator) but in SMPP the value should be
including the 4 byte indicator. Thus a diff of 4, forcing me
to handle this myself...

Magnus Fröberg wrote:
> Well, you can use the {packet, N} option and the packets are
> auto prepended with a N bytes length indicator and the recv
> will not return until the complete package is received.
> (if you are not using erlang in both ends you need to add
> the length bytes your self at the non-erlang side)
> See the inet man page.
> /Magnus
> --
> Magnus Fröberg                   Tel: +46 (0)8 545 55 026
> Alteon WebSystems AB             Email: mfroberg@REDACTED
> Sveavägen 151, P.O. Box 6701     WWW: http://www.alteonwebsystems.com
> SE-113 85 Stockholm, SWEDEN

Peter Lund
mobile: +46 70 543 9416

More information about the erlang-questions mailing list