Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
1343988c
Commit
1343988c
authored
Jun 24, 2022
by
Kristján Valur Jónsson
Committed by
michael-grunder
Jun 26, 2022
Browse files
Fix typos
parent
47b57aa2
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
1343988c
...
@@ -356,7 +356,7 @@ have the following prototype:
...
@@ -356,7 +356,7 @@ have the following prototype:
void
(
const
redisAsyncContext
*
c
,
int
status
);
void
(
const
redisAsyncContext
*
c
,
int
status
);
```
```
On a
*connect*
, the
`status`
argument is set to
`REDIS_OK`
if the connection attempted. In this
On a
*connect*
, the
`status`
argument is set to
`REDIS_OK`
if the connection attempt
succeed
ed. In this
case, the context is ready to accept commands. If it is called with
`REDIS_ERR`
then the
case, the context is ready to accept commands. If it is called with
`REDIS_ERR`
then the
connection attempt failed. The
`err`
field in the context can be accessed to find out the cause of the error.
connection attempt failed. The
`err`
field in the context can be accessed to find out the cause of the error.
After a failed connection attempt, the context object is automatically freed by the libary after calling
After a failed connection attempt, the context object is automatically freed by the libary after calling
...
@@ -375,7 +375,7 @@ api will return `REDIS_ERR`. The function to set the callbacks have the followin
...
@@ -375,7 +375,7 @@ api will return `REDIS_ERR`. The function to set the callbacks have the followin
int
redisAsyncSetConnectCallback
(
redisAsyncContext
*
ac
,
redisConnectCallback
*
fn
);
int
redisAsyncSetConnectCallback
(
redisAsyncContext
*
ac
,
redisConnectCallback
*
fn
);
int
redisAsyncSetDisconnectCallback
(
redisAsyncContext
*
ac
,
redisDisconnectCallback
*
fn
);
int
redisAsyncSetDisconnectCallback
(
redisAsyncContext
*
ac
,
redisDisconnectCallback
*
fn
);
```
```
`ac->data`
may be used to pass user data to both of thes
e this
callbacks. An typical implementation
`ac->data`
may be used to pass user data to both of thes callbacks. An typical implementation
might look something like this:
might look something like this:
```
c
```
c
void
appOnConnect
(
redisAsyncContext
*
c
,
int
status
)
void
appOnConnect
(
redisAsyncContext
*
c
,
int
status
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment