| 722 | } |
| 723 | |
| 724 | CService 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 | |
| 738 | std::string HTTPRequest::GetURI() |
| 739 | { |
no test coverage detected