| 605 | } |
| 606 | |
| 607 | CService HTTPRequest::GetPeer() const { |
| 608 | evhttp_connection* con = evhttp_request_get_connection(req); |
| 609 | CService peer; |
| 610 | if (con) { |
| 611 | // evhttp retains ownership over returned address string |
| 612 | const char* address = ""; |
| 613 | uint16_t port = 0; |
| 614 | evhttp_connection_get_peer(con, (char**)&address, &port); |
| 615 | LookupNumeric(address, peer, port); |
| 616 | } |
| 617 | return peer; |
| 618 | } |
| 619 | |
| 620 | std::string HTTPRequest::GetURI() const { return evhttp_request_get_uri(req); } |
| 621 |
no test coverage detected