2 +--------------------------------------------------------------------+
3 | libmemcached - C/C++ Client Library for memcached |
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted under the terms of the BSD license. |
7 | You should have received a copy of the license in a bundled file |
8 | named LICENSE; in case you did not receive a copy you can review |
9 | the terms online at: https://opensource.org/licenses/BSD-3-Clause |
10 +--------------------------------------------------------------------+
11 | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ |
12 | Copyright (c) 2020 Michael Wallner <mike@php.net> |
13 +--------------------------------------------------------------------+
18 #include "libmemcached/csl/common.h"
19 #include "libmemcached/csl/parser.h"
23 Context(const char *option_string
, size_t option_string_length
, memcached_st
*memc_
,
24 memcached_return_t
&rc_arg
)
30 , length(option_string_length
)
38 rc
= MEMCACHED_SUCCESS
;
40 memc
->state
.is_parsing
= true;
41 memcached_string_create(memc
, &_string_buffer
, 1024);
51 rc
= MEMCACHED_SUCCESS
;
55 bool set_hash(memcached_hash_t hash
);
65 bool is_server() const {
69 void hostname(const char *, size_t, server_t
&);
71 bool string_buffer(const char *, size_t, memcached_string_t
&);
73 const char *hostname() const {
77 void abort(const char *, config_tokentype
, const char *);
78 void error(const char *, config_tokentype
, const char *);
81 memcached_string_free(&_string_buffer
);
83 memc
->state
.is_parsing
= false;
86 config_tokentype previous_token
;
93 memcached_return_t
&rc
;
97 void destroy_scanner();
102 char _hostname
[NI_MAXHOST
];
104 memcached_string_st _string_buffer
;