icicleio / http

HTTP component for Icicle
MIT License
61 stars 5 forks source link

Connection: keep-alive [feature request] #14

Open tak3r opened 8 years ago

tak3r commented 8 years ago

Will http persistent connection feature be implemented in the near future? Thanks.

trowski commented 8 years ago

The HTTP server already handles keep-alive requests.

If your looking at the HTTP client, keep alive requests can made but the connection to the server has to be established manually (I recommend using Icicle\Socket\connect() or Icicle\Dns\connect()). You can then pass the Socket object resolved from these coroutines to Icicle\Http\Client\Requester::request() to make HTTP requests over the connection. Let me know if you run into any problems with this method.

tak3r commented 8 years ago

Hi, thanks for the reply, yes I'm after the HTTP Client keep alive request, I will try your suggestion first.