<div><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">When sending a large binary (say a couple of MB) followed by an eof through an ssh channel using the following...</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">
ssh_connection:send(Conn, Chan, BigBinary),</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">ssh_connection:send_eof(Conn, Chan),</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">... the eof is transmitted asynchronously and any untransmitted portion of BigBinary will be lost.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">
<br></div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">The patch linked below puts eofs through the existing data-send path so that all queued send data will be sent before the eof.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">
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).</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13.333333969116211px;background-color:rgb(255,255,255)">
<br></div><div><br></div><div>Tested on Windows.</div><div><br></div><div><br></div>git fetch git@github.com:goertzenator/otp.git ssh_sync_eof<div><br><div><a href="https://github.com/goertzenator/otp/compare/ssh_sync_eof">https://github.com/goertzenator/otp/compare/ssh_sync_eof</a></div>
<div><br></div><div><a href="https://github.com/goertzenator/otp/compare/ssh_sync_eof.patch">https://github.com/goertzenator/otp/compare/ssh_sync_eof.patch</a> </div><div><br><div><br></div></div></div><div>Dan.</div>