[erlang-questions] Unbuffered/blocking gen_tcp send

David Sveningsson ext@REDACTED
Fri Apr 17 15:12:38 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, is it possible to have gen_tcp:send block until the receiver has
received the package using gen_tcp:recv? For instance if the sender
transmits packages which takes long time to process for the receiver.

I've been experimenting with the buffer sizes but even setting to sndbuf
and recbuf to 1 won't make gen_tcp:send to block, unless the packages
are large (1Kb+).

I guess it would be possible to manually implement flow-control by
acknowledging each package but I would rather just have gen_tcp:send block.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknogEYACgkQ6pa1H/H5pqX6WQCg1kZz6alB/cTWQuyHA4hKugRC
13gAoJqSNkkUz/il3znllx6bD2LTTRZK
=KI0V
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list