close t
closes the connection. The returned deferred becomes determined once any
resources needed to maintain the connection have been released.
is_closed t
returns true if close
has ever been called (even if the returned
deferred has not yet been fulfilled).
Note that some modules implementing Closable
may call close internally upon
noticing that the connection was closed by the other side. The interface of such a
module ought to say that this is the case.