Closes the device stream with code and reason, as the relay does for the host.
code
reason
void close(int code, [String? reason]) => _close(code, reason);