| 537 | } |
| 538 | |
| 539 | CService HTTPRequest::GetPeer() |
| 540 | { |
| 541 | evhttp_connection* con = evhttp_request_get_connection(req); |
| 542 | CService peer; |
| 543 | if (con) { |
| 544 | // evhttp retains ownership over returned address string |
| 545 | const char* address = ""; |
| 546 | uint16_t port = 0; |
| 547 | evhttp_connection_get_peer(con, (char**)&address, &port); |
| 548 | peer = CService(address, port); |
| 549 | } |
| 550 | return peer; |
| 551 | } |
| 552 | |
| 553 | std::string HTTPRequest::GetURI() |
| 554 | { |
no test coverage detected