Function ConnectionStream.connected
Determines The current connection status.
abstract bool connected() @property @safe const;
If connected
is false
, writing to the connection will trigger an exception. Reading may
still succeed as long as there is data left in the input buffer. Use InputStream
instead to determine when to stop reading.