From c3365fadfb772fe69f2edc16a7ad3cfe8e5840b3 Mon Sep 17 00:00:00 2001 From: HÃ¥vard Pettersen Date: Fri, 12 Oct 2018 10:16:47 +0000 Subject: use crypto engine and sync crypto socket in http client --- fbench/src/test/httpclient.cpp | 7 +++++-- fbench/src/test/httpclient_splitstring.cpp | 6 ++++-- 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'fbench/src/test') diff --git a/fbench/src/test/httpclient.cpp b/fbench/src/test/httpclient.cpp index 4201da68b97..0d350c393c1 100644 --- a/fbench/src/test/httpclient.cpp +++ b/fbench/src/test/httpclient.cpp @@ -1,4 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + +#include #include #include #include @@ -11,13 +13,14 @@ main(int argc, char **argv) return 1; } + auto engine = std::make_shared(); HTTPClient *client; ssize_t len; if(argc == 4) { - client = new HTTPClient(argv[1], atoi(argv[2]), false, true); + client = new HTTPClient(engine, argv[1], atoi(argv[2]), false, true); } else { - client = new HTTPClient(argv[1], atoi(argv[2]), true, true); + client = new HTTPClient(engine, argv[1], atoi(argv[2]), true, true); } std::ostream * output = & std::cout; diff --git a/fbench/src/test/httpclient_splitstring.cpp b/fbench/src/test/httpclient_splitstring.cpp index d766b0f8f4b..4f3e0027db0 100644 --- a/fbench/src/test/httpclient_splitstring.cpp +++ b/fbench/src/test/httpclient_splitstring.cpp @@ -1,13 +1,15 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +#include #include #include class DebugHTTPClient : public HTTPClient { public: - DebugHTTPClient(const char* server, int port, bool keepAlive) - : HTTPClient(server, port, keepAlive, true) {} + DebugHTTPClient() + : HTTPClient(std::make_shared(), + "localhost", 80, true, true) {} static void SplitLineTest(const char *input); static void DebugSplitLine(); -- cgit v1.2.3