Add Connection::isConnected()
This commit is contained in:
@ -37,6 +37,11 @@ abstract class Connection
|
|||||||
$this->close();
|
$this->close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isConnected(): bool
|
||||||
|
{
|
||||||
|
return !$this->stream instanceof NullStream;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Promise<void>
|
* @return Promise<void>
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user