[erlang-patches] ssh synchronous eof

Daniel Goertzen <>
Tue Aug 28 22:31:53 CEST 2012


When sending a large binary (say a couple of MB) followed by an eof through
an ssh channel using the following...


ssh_connection:send(Conn, Chan, BigBinary),
ssh_connection:send_eof(Conn, Chan),

... the eof is transmitted asynchronously and any untransmitted portion of
BigBinary will be lost.


The patch linked below puts eofs through the existing data-send path so
that all queued send data will be sent before the eof.

The data-send pathway previously only carried {DataType, Data} tuples; it
may now also carry 'eof' atoms.  To abstractly represent both in the code I
use the name "Cmd" (Command).


Tested on Windows.


git fetch :goertzenator/otp.git ssh_sync_eof

https://github.com/goertzenator/otp/compare/ssh_sync_eof

https://github.com/goertzenator/otp/compare/ssh_sync_eof.patch


Dan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-patches/attachments/20120828/05a8e1ae/attachment.html>


More information about the erlang-patches mailing list