[erlang-questions] Unbuffered/blocking gen_tcp send
Fri Apr 17 15:12:38 CEST 2009
-----BEGIN PGP SIGNED MESSAGE-----
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
-----END PGP SIGNATURE-----
More information about the erlang-questions