blob: b245f4c16a9176fb0c6516782c70ca141d6220e1 [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2016 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef QUICHE_QUIC_CORE_QUIC_CONNECTION_CLOSE_DELEGATE_INTERFACE_H_
6#define QUICHE_QUIC_CORE_QUIC_CONNECTION_CLOSE_DELEGATE_INTERFACE_H_
7
vasilvv872e7a32019-03-12 16:42:44 -07008#include <string>
9
QUICHE teama6ef0a62019-03-07 20:34:33 -050010#include "net/third_party/quiche/src/quic/core/quic_error_codes.h"
11#include "net/third_party/quiche/src/quic/core/quic_types.h"
12#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
QUICHE teama6ef0a62019-03-07 20:34:33 -050013
14namespace quic {
15
16// Pure virtual class to close connection on unrecoverable errors.
17class QUIC_EXPORT_PRIVATE QuicConnectionCloseDelegateInterface {
18 public:
19 virtual ~QuicConnectionCloseDelegateInterface() {}
20
21 // Called when an unrecoverable error is encountered.
22 virtual void OnUnrecoverableError(QuicErrorCode error,
vasilvvc48c8712019-03-11 13:38:16 -070023 const std::string& error_details,
QUICHE teama6ef0a62019-03-07 20:34:33 -050024 ConnectionCloseSource source) = 0;
25};
26
27} // namespace quic
28
29#endif // QUICHE_QUIC_CORE_QUIC_CONNECTION_CLOSE_DELEGATE_INTERFACE_H_