| 76 | |
| 77 | // Implementation of receive method. |
| 78 | template<typename T, const size_t SIZE> bool curl_receiver<T,SIZE>::receive(curl_easy &easy) { |
| 79 | const CURLcode code = curl_easy_recv(easy.get_curl(),&_buffer,SIZE,&_recv_bytes); |
| 80 | if (code == CURLE_AGAIN) { |
| 81 | return false; |
| 82 | } |
| 83 | if (code != CURLE_OK) { |
| 84 | throw curl_easy_exception(code,__FUNCTION__); |
| 85 | } |
| 86 | return true; |
| 87 | } |
| 88 | |
| 89 | // Implementation of get_buffer method. |
| 90 | template<typename T, const size_t SIZE> inline std::array<T,SIZE> curl_receiver<T,SIZE>::get_buffer() const { |
nothing calls this directly
no test coverage detected