Line data Source code
1 : #include "source/common/quic/quic_network_connection.h" 2 : 3 : namespace Envoy { 4 : namespace Quic { 5 : 6 515 : QuicNetworkConnection::QuicNetworkConnection(Network::ConnectionSocketPtr&& connection_socket) { 7 515 : connection_sockets_.push_back(std::move(connection_socket)); 8 515 : } 9 : 10 515 : QuicNetworkConnection::~QuicNetworkConnection() { 11 515 : for (auto& socket : connection_sockets_) { 12 515 : socket->close(); 13 515 : } 14 515 : } 15 : 16 0 : uint64_t QuicNetworkConnection::id() const { return envoy_connection_->id(); } 17 : 18 : void QuicNetworkConnection::setEnvoyConnection(Network::Connection& connection, 19 515 : QuicWriteEventCallback& write_callback) { 20 515 : envoy_connection_ = &connection; 21 515 : write_callback_ = &write_callback; 22 515 : } 23 : 24 0 : void QuicNetworkConnection::onWriteEventDone() { 25 0 : if (write_callback_ != nullptr) { 26 0 : write_callback_->onWriteEventDone(); 27 0 : } 28 0 : } 29 : 30 : } // namespace Quic 31 : } // namespace Envoy