Closed albaropereyra22 closed 1 year ago
Here is a link to the project: https://github.com/albaropereyra22/client_example
Just interesting - if you point to HttpClient and goto definition (not declaration) - you will find this method in the class defintion or VS shows other file? File has definition on line 166 in my version :
/// Set socket options(before connecting)
/**
* @brief Set the callback which is called before connecting to the
* server. The callback is used to set socket options on the socket fd.
*
* @code
auto client = HttpClient::newHttpClient("http://www.baidu.com");
client->setSockOptCallback([](int fd) {});
auto req = HttpRequest::newHttpRequest();
client->sendRequest(req, [](ReqResult result, const HttpResponsePtr&
response) {});
@endcode
*/
virtual void setSockOptCallback(std::function<void(int)> cb) = 0;
Here are my options thus far:
I figured it out. I got rid of the code since it was for linux anyways. That seems to have resolved my issue.
Thanks.
Describe the bug Unable to build client example. I get the following error.
Severity Code Description Project File Line Suppression State Error C2039 'setSockOptCallback': is not a member of 'drogon::HttpClient' client_example C:\Users\dell\client_example\main.cc 20
To Reproduce Steps to reproduce the behavior: drogon_ctl create project client_example. copy client_example code. cd build cmake .. open sln file in visual studio, select release under build select rebuild.
Expected behavior Run client example.
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Add any other context about the problem here.