[erlang-questions] Hackney socket
Sun Dec 28 10:59:47 CET 2014
Thank you Benoit!
On Wed, Dec 24, 2014 at 6:45 PM, Benoit Chesneau <>
> On Wed, Dec 24, 2014 at 12:40 PM, Roberto Ostinelli <>
>> 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.
>> I therefore need to retrieve the Socket from a Connection Reference, so I
>> can send chunked data into it.
>> Does anyone know what is the cleanest way to retrieve the underlying
>> socket from a Connection Reference?
> 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.
> - benoit
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions