Closes the connection with a close code and a reason.
final void Function(int code, String reason) close;