MCPcopy Create free account
hub / github.com/BitcoinUnlimited/BitcoinUnlimited / GetPeer

Method GetPeer

src/httpserver.cpp:676–689  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

674}
675
676CService HTTPRequest::GetPeer()
677{
678 evhttp_connection *con = evhttp_request_get_connection(req);
679 CService peer;
680 if (con)
681 {
682 // evhttp retains ownership over returned address string
683 const char *address = "";
684 uint16_t port = 0;
685 evhttp_connection_get_peer(con, (char **)&address, &port);
686 peer = CService(address, port);
687 }
688 return peer;
689}
690
691std::string HTTPRequest::GetURI() { return evhttp_request_get_uri(req); }
692HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod()

Callers 2

http_request_cbFunction · 0.80
HTTPReq_JSONRPCFunction · 0.80

Calls 1

CServiceClass · 0.70

Tested by

no test coverage detected