| 611 | } |
| 612 | |
| 613 | CService HTTPRequest::GetPeer() |
| 614 | { |
| 615 | evhttp_connection* con = evhttp_request_get_connection(req); |
| 616 | CService peer; |
| 617 | if (con) { |
| 618 | // evhttp retains ownership over returned address string |
| 619 | const char* address = ""; |
| 620 | uint16_t port = 0; |
| 621 | evhttp_connection_get_peer(con, (char**)&address, &port); |
| 622 | peer = LookupNumeric(address, port); |
| 623 | } |
| 624 | return peer; |
| 625 | } |
| 626 | |
| 627 | std::string HTTPRequest::GetURI() |
| 628 | { |
no test coverage detected