<div dir="ltr">Thank you Benoit!<div><br></div><div>Best,</div><div>r.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 24, 2014 at 6:45 PM, Benoit Chesneau <span dir="ltr"><<a href="mailto:bchesneau@gmail.com" target="_blank">bchesneau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Dec 24, 2014 at 12:40 PM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>I'm using hackney to send a HTTPS request. The server I'm connecting to will keep the resulting TCP connection open, so that it then becomes a two-way communication channel using HTTP chunk.</div><div><br></div><div>I therefore need to retrieve the Socket from a Connection Reference, so I can send chunked data into it.</div><div><br></div><div>Does anyone know what is the cleanest way to retrieve the underlying socket from a Connection Reference?</div><div><br></div><div>Best,</div><div>r.</div><div><br></div></div></blockquote><div><br></div></div></div><div>If you want to reuse the socket and cancel the request then you can use `hackney:cancel_request/1` . Note that you can directly send chunks using hackney if you specify the Tranfer-Encoding header. Hackney will take care about it. It also works if you want to stream the request.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>- benoit </div></font></span></div></div></div>
</blockquote></div><br></div>