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

Method GetPeer

src/httpserver.cpp:539–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537}
538
539CService HTTPRequest::GetPeer()
540{
541 evhttp_connection* con = evhttp_request_get_connection(req);
542 CService peer;
543 if (con) {
544 // evhttp retains ownership over returned address string
545 const char* address = "";
546 uint16_t port = 0;
547 evhttp_connection_get_peer(con, (char**)&address, &port);
548 peer = CService(address, port);
549 }
550 return peer;
551}
552
553std::string HTTPRequest::GetURI()
554{

Callers 2

http_request_cbFunction · 0.80
HTTPReq_JSONRPCFunction · 0.80

Calls 1

CServiceClass · 0.70

Tested by

no test coverage detected