MCPcopy Create free account
hub / github.com/Bitcoin-ABC/bitcoin-abc / GetPeer

Method GetPeer

src/httpserver.cpp:732–743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

730}
731
732CService HTTPRequest::GetPeer() const {
733 evhttp_connection *con = evhttp_request_get_connection(req);
734 CService peer;
735 if (con) {
736 // evhttp retains ownership over returned address string
737 const char *address = "";
738 uint16_t port = 0;
739 evhttp_connection_get_peer(con, (char **)&address, &port);
740 peer = LookupNumeric(address, port);
741 }
742 return peer;
743}
744
745std::string HTTPRequest::GetURI() const {
746 return evhttp_request_get_uri(req);

Callers 3

http_request_cbFunction · 0.80
ProcessHTTPRequestMethod · 0.80
FUZZ_TARGETFunction · 0.80

Calls 1

LookupNumericFunction · 0.85

Tested by 1

FUZZ_TARGETFunction · 0.64