def update_connection(host, port, secure)
      @host = valid! host, valid_host(host), :@host,
                     required: true,
                     required_error: 'networks must have a hostname',
                     invalid_error: 'invalid hostname %s'
      @port = valid! port, valid_port(port), :@port,
                     invalid_error: 'invalid port number %s'
      @secure = valid!(secure, valid_boolean(secure), :@secure,
                       invalid_error: 'secure must be a boolean') { false }
    end
def update_connection(host, port, secure)
      @host = valid! host, valid_host(host), :@host,
                     required: true,
                     required_error: 'networks must have a hostname',
                     invalid_error: 'invalid hostname %s'
      @port = valid! port, valid_port(port), :@port,
                     invalid_error: 'invalid port number %s'
      @secure = valid!(secure, valid_boolean(secure), :@secure,
                       invalid_error: 'secure must be a boolean') { false }
    end
Updates the connection details of this network.

 @param host [String] the new hostname, or +nil+ to keep the current value
 @param port [Integer] the new port, or +nil+ to keep the current value
 @param secure [Boolean] whether to connect over TLS, or +nil+ to keep the
                         current value