Lines Matching refs:Connection
41 std::unique_ptr<Connection> MakeConnection(unique_fd fd);
44 std::unique_ptr<Connection> MakeConnection<FdConnection>(unique_fd fd) {
50 std::unique_ptr<Connection> MakeConnection<NonblockingFdConnection>(unique_fd fd) {
51 return Connection::FromFd(std::move(fd));
66 client->SetReadCallback([](Connection*, std::unique_ptr<apacket>) -> bool { return true; }); in BM_Connection_Unidirectional() argument
67 … server->SetReadCallback([&received_bytes](Connection*, std::unique_ptr<apacket> packet) -> bool { in BM_Connection_Unidirectional() argument
73 [](Connection*, const std::string& error) { LOG(INFO) << "client closed: " << error; }); in BM_Connection_Unidirectional() argument
75 [](Connection*, const std::string& error) { LOG(INFO) << "server closed: " << error; }); in BM_Connection_Unidirectional() argument
124 … client->SetReadCallback([&received_bytes](Connection*, std::unique_ptr<apacket> packet) -> bool { in BM_Connection_Echo() argument
129 static const auto handle_packet = [](Connection* connection, std::unique_ptr<apacket> packet) { in BM_Connection_Echo()
133 server->SetReadCallback([](Connection* connection, std::unique_ptr<apacket> packet) -> bool { in BM_Connection_Echo()
147 [](Connection*, const std::string& error) { LOG(INFO) << "client closed: " << error; }); in BM_Connection_Echo() argument
149 [](Connection*, const std::string& error) { LOG(INFO) << "server closed: " << error; }); in BM_Connection_Echo() argument