MCPcopy Create free account
hub / github.com/LUX-Core/lux / GetPeer

Method GetPeer

src/httpserver.cpp:724–736  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722}
723
724CService HTTPRequest::GetPeer()
725{
726 evhttp_connection* con = evhttp_request_get_connection(req);
727 CService peer;
728 if (con) {
729 // evhttp retains ownership over returned address string
730 const char* address = "";
731 uint16_t port = 0;
732 evhttp_connection_get_peer(con, (char**)&address, &port);
733 peer = CService(address, port);
734 }
735 return peer;
736}
737
738std::string HTTPRequest::GetURI()
739{

Callers 2

http_request_cbFunction · 0.80
HTTPReq_JSONRPCFunction · 0.80

Calls 1

CServiceClass · 0.70

Tested by

no test coverage detected