25 #include <psocksxx/iosockstream.h> 29 #ifndef ICAP_BUFFER_SIZE 30 #define ICAP_BUFFER_SIZE 1024 40 std::string extention;
50 template <
typename T> std::string itoa( T number ) {
51 std::ostringstream ss;
63 unsigned int hextodec(
const std::string &hex )
throw();
71 const std::string dectohex(
const unsigned int &dec )
throw();
83 int read_line( psocksxx::iosockstream * socket,
char * buf,
int buf_length,
bool incl_endl =
false )
throw();
93 std::string read_line( psocksxx::iosockstream * socket,
bool incl_endl =
false )
throw();
102 std::string read_data( psocksxx::iosockstream * socket,
int size )
throw();
110 unsigned int read_chunk_size( psocksxx::iosockstream * socket )
throw();
118 void read_chunk_header( psocksxx::iosockstream * socket,
chunk_t &chunk )
throw();
126 chunk_t read_chunk( psocksxx::iosockstream * socket )
throw();
134 std::string read_chunked( psocksxx::iosockstream * socket )
throw();
143 bool read_chunked_payload( psocksxx::iosockstream * socket, std::string &payload )
throw();
152 bool send_line(
const std::string &line, psocksxx::iosockstream * socket )
throw();
163 bool send_data(
const std::string &data, psocksxx::iosockstream * socket )
throw();
172 bool send_chunked(
const std::string &data, psocksxx::iosockstream * socket )
throw();
180 std::vector<std::string> split(
const std::string &str,
const std::string &delimiter =
" " )
throw();
188 std::string <rim( std::string &str )
throw();
196 std::string &rtrim( std::string &str )
throw();
204 std::string &trim( std::string &str )
throw();
222 bool read_req_data(
icap::Request * request, psocksxx::iosockstream * socket )
throw();
232 bool read_req_continue_data(
icap::Request * request, psocksxx::iosockstream * socket )
throw();
241 bool send_headers( icap::Header::headers_t headers, psocksxx::iosockstream * socket )
throw();
251 bool send_response(
icap::Response * response, psocksxx::iosockstream * socket )
throw();
258 const std::string response_status(
const ResponseHeader::status_t &status )
throw();
Definition: response.h:29