You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$conn= newHttpConnection(...);
$conn->usingKeepAlive(function() {
$r1= $conn->get(...);
$r1->abort(); // Do not process content until end$r2= $conn->post(...);
Streams::readAll($r2->in());
});
$conn= newHttpConnection(...);
$pool= $conn->pool(5);
$pool->get()->then(function($res) {
// Uses first socket
});
$pool->post()->then(function($res) {
// Uses first *free* socket within the pool
});
See #22 - this is now implemented by passing Connection: keep-alive to requests. Sockets are reused when all data from a previous response has been consumed, except if the server issues a Connection: close.
Activity
thekid commentedon Dec 2, 2015
💡 Idea no. 1
thekid commentedon Dec 2, 2015
💡 Idea no. 2
thekid commentedon Dec 2, 2015
💡 Idea no. 3
thekid commentedon Dec 2, 2015
💡 Idea no. 4
thekid commentedon Dec 2, 2015
💡 Idea no. 5
thekid commentedon Oct 3, 2017
See #22 - this is now implemented by passing
Connection: keep-aliveto requests. Sockets are reused when all data from a previous response has been consumed, except if the server issues aConnection: close.