X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fprotocol_handler.h;h=9f61187f562174041989d67811e67791a26b9476;hb=f285e1b3821f56a8983b5ce9fb1a0070e7bb0a1c;hp=78eda07745a4d86a55b214d8d49c905bfe1b3b56;hpb=284978b1dc258cb8cd2a32d6a0f25f2f9b284149;p=awesomized%2Flibmemcached diff --git a/libmemcached/protocol_handler.h b/libmemcached/protocol_handler.h index 78eda077..9f61187f 100644 --- a/libmemcached/protocol_handler.h +++ b/libmemcached/protocol_handler.h @@ -19,6 +19,7 @@ # include #endif +#include #include #include #include @@ -48,7 +49,7 @@ extern "C" { * or -1 upon error (errno should contain more information) */ typedef ssize_t (*memcached_protocol_recv_func)(const void *cookie, - int fd, + memcached_socket_t fd, void *buf, size_t nbuf); @@ -64,7 +65,7 @@ typedef ssize_t (*memcached_protocol_recv_func)(const void *cookie, * or -1 upon error (errno should contain more information) */ typedef ssize_t (*memcached_protocol_send_func)(const void *cookie, - int fd, + memcached_socket_t fd, const void *buf, size_t nbuf); @@ -139,7 +140,7 @@ void memached_protocol_set_io_functions(memcached_protocol_st *instance, * @return NULL if allocation fails, otherwise an instance */ LIBMEMCACHED_API -memcached_protocol_client_st *memcached_protocol_create_client(memcached_protocol_st *instance, int sock); +memcached_protocol_client_st *memcached_protocol_create_client(memcached_protocol_st *instance, memcached_socket_t sock); /** * Destroy a client handle. @@ -191,7 +192,7 @@ memcached_protocol_event_t memcached_protocol_client_work(memcached_protocol_cli * @return the socket handle */ LIBMEMCACHED_API -int memcached_protocol_client_get_socket(memcached_protocol_client_st *client); +memcached_socket_t memcached_protocol_client_get_socket(memcached_protocol_client_st *client); /** * Get the error id socket attached to a client handle