extern uint64_t htonll(uint64_t);
void host_reset(memcached_st *ptr, memcached_server_st *host,
- char *hostname, unsigned int port,
+ const char *hostname, unsigned int port,
memcached_connection type);
#endif /* __COMMON_H__ */
/* Server Public functions */
memcached_return memcached_server_add_udp(memcached_st *ptr,
- char *hostname,
+ const char *hostname,
unsigned int port);
memcached_return memcached_server_add_unix_socket(memcached_st *ptr,
- char *filename);
-memcached_return memcached_server_add(memcached_st *ptr, char *hostname,
+ const char *filename);
+memcached_return memcached_server_add(memcached_st *ptr, const char *hostname,
unsigned int port);
void memcached_server_list_free(memcached_server_st *ptr);
memcached_return memcached_server_push(memcached_st *ptr, memcached_server_st *list);
memcached_server_st *memcached_server_list_append(memcached_server_st *ptr,
- char *hostname, unsigned int port,
+ const char *hostname, unsigned int port,
memcached_return *error);
unsigned int memcached_server_list_count(memcached_server_st *ptr);
memcached_server_st *memcached_servers_parse(char *server_strings);
#include <math.h>
/* Protoypes (static) */
-static memcached_return server_add(memcached_st *ptr, char *hostname,
+static memcached_return server_add(memcached_st *ptr, const char *hostname,
unsigned int port,
memcached_connection type);
memcached_return update_continuum(memcached_st *ptr);
}
void host_reset(memcached_st *ptr, memcached_server_st *host,
- char *hostname, unsigned int port,
+ const char *hostname, unsigned int port,
memcached_connection type)
{
memset(host, 0, sizeof(memcached_server_st));
return run_distribution(ptr);
}
-memcached_return memcached_server_add_unix_socket(memcached_st *ptr, char *filename)
+memcached_return memcached_server_add_unix_socket(memcached_st *ptr, const char *filename)
{
if (!filename)
return MEMCACHED_FAILURE;
}
memcached_return memcached_server_add_udp(memcached_st *ptr,
- char *hostname,
+ const char *hostname,
unsigned int port)
{
if (!port)
}
memcached_return memcached_server_add(memcached_st *ptr,
- char *hostname,
+ const char *hostname,
unsigned int port)
{
if (!port)
return server_add(ptr, hostname, port, MEMCACHED_CONNECTION_TCP);
}
-static memcached_return server_add(memcached_st *ptr, char *hostname,
+static memcached_return server_add(memcached_st *ptr, const char *hostname,
unsigned int port,
memcached_connection type)
{
}
memcached_server_st *memcached_server_list_append(memcached_server_st *ptr,
- char *hostname, unsigned int port,
+ const char *hostname, unsigned int port,
memcached_return *error)
{
unsigned int count;