New API: Session::getKeepAlive
* Added Session::isKeepAlive
* Rename to getKeepAlive()
Not only bool, null value means we need not specify the "Connection" field in headers
@@ -97,6 +97,11 @@ class Session extends Socket
return $this->type;
}
+ public function getKeepAlive(): ?bool
+ {
+ return $this->keepAlive;
+ }
+
public function recvHttpRequest(Request $request = null): Request
{
$parser = $this->httpParser;
