19 #include <gflags/gflags.h> 28 using namespace folly;
46 std::cout <<
"EOF received :(" << std::endl;
54 std::shared_ptr<AsyncTransportWrapper> sock)
override {
71 client.
group(std::make_shared<folly::IOThreadPoolExecutor>(1));
84 pipeline->write(line +
"\r\n").get();
90 }
catch(
const std::exception& e) {
void readEOF(Context *ctx) override
Pipeline< folly::IOBufQueue &, std::string > TelnetPipeline
TelnetPipeline::Ptr newPipeline(std::shared_ptr< AsyncTransportWrapper > sock) override
fbstring exceptionStr(const std::exception &e)
void BENCHFUN() getline(size_t iters, size_t arg)
DEFINE_int32(port, 23,"test telnet server port")
folly::Future< Pipeline * > connect(const folly::SocketAddress &address, std::chrono::milliseconds timeout=std::chrono::milliseconds(0)) override
—— Concurrent Priority Queue Implementation ——
void init(int *argc, char ***argv, bool removeFlags)
BaseClientBootstrap< Pipeline > * pipelineFactory(std::shared_ptr< PipelineFactory< Pipeline >> factory) noexcept
void read(Context *, std::string msg) override
void readException(Context *ctx, exception_wrapper e) override
int main(int argc, char **argv)
DEFINE_string(host,"::1","test telnet server address")
std::shared_ptr< Pipeline > Ptr
ClientBootstrap * group(std::shared_ptr< folly::IOThreadPoolExecutor > group)
int close(NetworkSocket s)