Permalink
Browse files

add support for a pool.

hackney is now supporting the use of a socket pool to reduce the use of
connections.

ex:

    Client = hackney:request(get, <<"https://friendpaste.com">>, [], <<>>,
                             [{pool, default}]).

Will use the default connection pool. You can reuse this pool later
using the same Client:

    hackney:send_request(Client, {get, <<"/">>, [], <<>>}).

Or do a new connection:

    Client = hackney:request(get, <<"https://friendpaste.com/_all_languages">>,
                             [], <<>>, [{pool, default}]).
  • Loading branch information...
1 parent bf2fcac commit 0bb952f08d3872098063398d63e9f09cc300f534 @benoitc committed Jul 16, 2012
Showing with 341 additions and 14,878 deletions.
  1. +1 −0 .gitignore
  2. +0 −14,804 erl_crash.dump
  3. +50 −0 examples/test1.erl
  4. +3 −4 src/hackney.app.src
  5. +69 −34 src/hackney.erl
  6. +192 −0 src/hackney_pool.erl
  7. +0 −35 src/hackney_pool_sup.erl
  8. +8 −0 src/hackney_response.erl
  9. +5 −1 src/hackney_sup.erl
  10. +13 −0 src/hackney_util.erl
View
@@ -3,3 +3,4 @@ ebin
*.sw*
deps
.DS_Store
+erl_crash.dump
Oops, something went wrong.

0 comments on commit 0bb952f

Please sign in to comment.