You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @return whether we are connected to the redis server
142
-
*
143
-
*/
140
+
/**
141
+
* @return whether we are connected to the redis server
142
+
*
143
+
*/
144
144
boolis_connected() const;
145
145
146
-
/**
147
-
* disconnect from redis server
148
-
*
149
-
* @param wait_for_removal when sets to true, disconnect blocks until the underlying TCP client has been effectively removed from the io_service and that all the underlying callbacks have completed.
150
-
*
151
-
*/
146
+
/**
147
+
* disconnect from redis server
148
+
*
149
+
* @param wait_for_removal when sets to true, disconnect blocks until the underlying TCP client has been effectively removed from the io_service and that all the underlying callbacks have completed.
150
+
*
151
+
*/
152
152
voiddisconnect(bool wait_for_removal = false);
153
153
154
-
/**
155
-
* @return whether an attempt to reconnect is in progress
156
-
*
157
-
*/
154
+
/**
155
+
* @return whether an attempt to reconnect is in progress
156
+
*
157
+
*/
158
158
boolis_reconnecting() const;
159
159
160
-
/**
161
-
* stop any reconnect in progress
162
-
*
163
-
*/
160
+
/**
161
+
* stop any reconnect in progress
162
+
*
163
+
*/
164
164
voidcancel_reconnect();
165
165
166
166
public:
167
-
/**
168
-
* reply callback called whenever a reply is received
169
-
* takes as parameter the received reply
170
-
*
171
-
*/
167
+
/**
168
+
* reply callback called whenever a reply is received
* Sends all the commands that have been stored by calling send() since the last commit() call to the redis server.
198
-
* That is, pipelining is supported in a very simple and efficient way: client.send(...).send(...).send(...).commit() will send the 3 commands at once (instead of sending 3 network requests, one for each command, as it would have been done without pipelining).
199
-
* Pipelined commands are always removed from the buffer, even in the case of an error (for example, calling commit while the client is not connected, something that throws an exception).
200
-
* commit() works asynchronously: it returns immediately after sending the queued requests and replies are processed asynchronously.
201
-
*
202
-
* Please note that, while commit() can safely be called from inside a reply callback, calling sync_commit() from inside a reply callback is not permitted and will lead to undefined behavior, mostly deadlock.
203
-
*
204
-
*/
196
+
/**
197
+
* Sends all the commands that have been stored by calling send() since the last commit() call to the redis server.
198
+
* That is, pipelining is supported in a very simple and efficient way: client.send(...).send(...).send(...).commit() will send the 3 commands at once (instead of sending 3 network requests, one for each command, as it would have been done without pipelining).
199
+
* Pipelined commands are always removed from the buffer, even in the case of an error (for example, calling commit while the client is not connected, something that throws an exception).
200
+
* commit() works asynchronously: it returns immediately after sending the queued requests and replies are processed asynchronously.
201
+
*
202
+
* Please note that, while commit() can safely be called from inside a reply callback, calling sync_commit() from inside a reply callback is not permitted and will lead to undefined behavior, mostly deadlock.
203
+
*
204
+
*/
205
205
client &commit();
206
206
207
-
/**
208
-
* same as commit(), but synchronous
209
-
* will block until all pending commands have been sent and that a reply has been received for each of them and all underlying callbacks completed
210
-
*
211
-
* @return current instance
212
-
*
213
-
*/
207
+
/**
208
+
* same as commit(), but synchronous
209
+
* will block until all pending commands have been sent and that a reply has been received for each of them and all underlying callbacks completed
210
+
*
211
+
* @return current instance
212
+
*
213
+
*/
214
214
client &sync_commit();
215
215
216
-
/**
217
-
* same as sync_commit, but with a timeout
218
-
* will simply block until it completes or timeout expires
219
-
*
220
-
* @return current instance
221
-
*
222
-
*/
216
+
/**
217
+
* same as sync_commit, but with a timeout
218
+
* will simply block until it completes or timeout expires
0 commit comments