MCPcopy Create free account
hub / github.com/bitcoin-sv/bitcoin-sv / GetPeer

Method GetPeer

src/httpserver.cpp:567–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567CService HTTPRequest::GetPeer() {
568 evhttp_connection *con = evhttp_request_get_connection(req);
569 CService peer;
570 if (con) {
571 // evhttp retains ownership over returned address string
572 char * address = nullptr;
573 uint16_t port = 0;
574 evhttp_connection_get_peer(con, &address, &port);
575 peer = LookupNumeric(address, port);
576 }
577 return peer;
578}
579
580std::string HTTPRequest::GetURI() {
581 return evhttp_request_get_uri(req);

Callers 2

http_request_cbFunction · 0.80
HTTPReq_JSONRPCFunction · 0.80

Calls 1

LookupNumericFunction · 0.85

Tested by

no test coverage detected