forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassthrough.cc
56 lines (40 loc) · 1.87 KB
/
passthrough.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "source/extensions/transport_sockets/common/passthrough.h"
#include "envoy/network/connection.h"
#include "envoy/network/transport_socket.h"
#include "source/common/buffer/buffer_impl.h"
namespace Envoy {
namespace Extensions {
namespace TransportSockets {
PassthroughSocket::PassthroughSocket(Network::TransportSocketPtr&& transport_socket)
: transport_socket_(std::move(transport_socket)) {}
void PassthroughSocket::setTransportSocketCallbacks(Network::TransportSocketCallbacks& callbacks) {
transport_socket_->setTransportSocketCallbacks(callbacks);
}
std::string PassthroughSocket::protocol() const { return transport_socket_->protocol(); }
absl::string_view PassthroughSocket::failureReason() const {
return transport_socket_->failureReason();
}
bool PassthroughSocket::canFlushClose() { return transport_socket_->canFlushClose(); }
Api::SysCallIntResult PassthroughSocket::connect(Network::ConnectionSocket& socket) {
return transport_socket_->connect(socket);
}
void PassthroughSocket::closeSocket(Network::ConnectionEvent event) {
transport_socket_->closeSocket(event);
}
Network::IoResult PassthroughSocket::doRead(Buffer::Instance& buffer) {
return transport_socket_->doRead(buffer);
}
Network::IoResult PassthroughSocket::doWrite(Buffer::Instance& buffer, bool end_stream) {
return transport_socket_->doWrite(buffer, end_stream);
}
void PassthroughSocket::onConnected() { transport_socket_->onConnected(); }
Ssl::ConnectionInfoConstSharedPtr PassthroughSocket::ssl() const {
return transport_socket_->ssl();
}
void PassthroughSocket::configureInitialCongestionWindow(uint64_t bandwidth_bits_per_sec,
std::chrono::microseconds rtt) {
return transport_socket_->configureInitialCongestionWindow(bandwidth_bits_per_sec, rtt);
}
} // namespace TransportSockets
} // namespace Extensions
} // namespace Envoy