| 674 | } |
| 675 | |
| 676 | CService HTTPRequest::GetPeer() |
| 677 | { |
| 678 | evhttp_connection *con = evhttp_request_get_connection(req); |
| 679 | CService peer; |
| 680 | if (con) |
| 681 | { |
| 682 | // evhttp retains ownership over returned address string |
| 683 | const char *address = ""; |
| 684 | uint16_t port = 0; |
| 685 | evhttp_connection_get_peer(con, (char **)&address, &port); |
| 686 | peer = CService(address, port); |
| 687 | } |
| 688 | return peer; |
| 689 | } |
| 690 | |
| 691 | std::string HTTPRequest::GetURI() { return evhttp_request_get_uri(req); } |
| 692 | HTTPRequest::RequestMethod HTTPRequest::GetRequestMethod() |
no test coverage detected