X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fio.hpp;h=5480239f25e51313fab892b17f8ebd60f470737e;hb=d169e8c62f8ca4fe7d058d8e2254426105032b7e;hp=7413ac4b4d091032739ea8e4320b5bbe707173f7;hpb=647f5b82467172c55e456b6833d4c2f0bdc0bc5a;p=awesomized%2Flibmemcached diff --git a/libmemcached/io.hpp b/libmemcached/io.hpp index 7413ac4b..5480239f 100644 --- a/libmemcached/io.hpp +++ b/libmemcached/io.hpp @@ -38,46 +38,36 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif +void initialize_binary_request(memcached_instance_st* server, protocol_binary_request_header&); -LIBMEMCACHED_LOCAL -memcached_return_t memcached_io_wait_for_write(memcached_server_write_instance_st ptr); +bool memcached_io_write(memcached_instance_st* ptr); -LIBMEMCACHED_LOCAL -void memcached_io_reset(memcached_server_write_instance_st ptr); +ssize_t memcached_io_write(memcached_instance_st* ptr, + const void *buffer, size_t length, bool with_flush); -LIBMEMCACHED_LOCAL -memcached_return_t memcached_io_read(memcached_server_write_instance_st ptr, - void *buffer, size_t length, ssize_t *nread); +bool memcached_io_writev(memcached_instance_st* ptr, + libmemcached_io_vector_st vector[], + const size_t number_of, const bool with_flush); + +memcached_return_t memcached_io_wait_for_write(memcached_instance_st*); +memcached_return_t memcached_io_wait_for_read(memcached_instance_st*); + +void memcached_io_reset(memcached_instance_st* ptr); + +memcached_return_t memcached_io_read(memcached_instance_st* ptr, + void *buffer, size_t length, ssize_t& nread); /* Read a line (terminated by '\n') into the buffer */ -LIBMEMCACHED_LOCAL -memcached_return_t memcached_io_readline(memcached_server_write_instance_st ptr, +memcached_return_t memcached_io_readline(memcached_instance_st* ptr, char *buffer_ptr, size_t size, size_t& total); -LIBMEMCACHED_LOCAL -void memcached_io_close(memcached_server_write_instance_st ptr); - /* Read n bytes of data from the server and store them in dta */ -LIBMEMCACHED_LOCAL -memcached_return_t memcached_safe_read(memcached_server_write_instance_st ptr, +memcached_return_t memcached_safe_read(memcached_instance_st* ptr, void *dta, - size_t size); - -LIBMEMCACHED_LOCAL -memcached_return_t memcached_io_init_udp_header(memcached_server_write_instance_st ptr, - uint16_t thread_id); - -LIBMEMCACHED_LOCAL -memcached_server_write_instance_st memcached_io_get_readable_server(memcached_st *memc); + const size_t size); -LIBMEMCACHED_LOCAL -memcached_return_t memcached_io_slurp(memcached_server_write_instance_st ptr); +memcached_instance_st* memcached_io_get_readable_server(memcached_st *memc, memcached_return_t&); -#ifdef __cplusplus -} -#endif +memcached_return_t memcached_io_slurp(memcached_instance_st* ptr);