| 34 | * connection on an easy handler. |
| 35 | */ |
| 36 | template<class T> class curl_sender { |
| 37 | public: |
| 38 | /** |
| 39 | * The constructor initializes the easy handler and the number of |
| 40 | * sent bytes. |
| 41 | */ |
| 42 | explicit curl_sender(curl_easy &easy); |
| 43 | /** |
| 44 | * This method wraps the curl_easy_send function that sends raw data |
| 45 | * on an established connection on an easy handler. |
| 46 | */ |
| 47 | void send(T, size_t); |
| 48 | /** |
| 49 | * Simple getter method that returns sent's current byte number. |
| 50 | */ |
| 51 | size_t get_sent_bytes() const; |
| 52 | private: |
| 53 | curl_easy &_easy; |
| 54 | size_t _sent_bytes; |
| 55 | }; |
| 56 | |
| 57 | // Implementation of constructor. |
| 58 | template<class T> curl_sender<T>::curl_sender(curl_easy &easy) : _easy(easy), _sent_bytes(0) { |
nothing calls this directly
no outgoing calls
no test coverage detected