- SERVER '=' server
- {
- (void) memcached_server_add_parsed(parser->memc, $3.c_str, $3.length, $3.port, 0);
+ SERVER HOSTNAME optional_port optional_weight
+ {
+ if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
+ {
+ parser_abort(context, NULL);
+ }
+ context->unset_server();
+ }
+ | SERVER IPADDRESS optional_port optional_weight
+ {
+ if (memcached_failed(context->rc= memcached_server_add_with_weight(context->memc, $2.c_str, $3, $4)))
+ {
+ parser_abort(context, NULL);
+ }
+ context->unset_server();
+ }
+ | SOCKET string optional_weight
+ {
+ if (memcached_failed(context->rc= memcached_server_add_unix_socket_with_weight(context->memc, $2.c_str, $3)))
+ {
+ parser_abort(context, NULL);
+ }
+ }
+ | CONFIGURE_FILE string
+ {
+ memcached_set_configuration_file(context->memc, $2.c_str, $2.size);
+ }
+ | POOL_MIN NUMBER
+ {
+ context->memc->configure.initial_pool_size= $2;