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
f0307c61
Commit
f0307c61
authored
Apr 21, 2011
by
Pieter Noordhuis
Browse files
Move definitions around
parent
41d4d9c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
hiredis.h
View file @
f0307c61
...
...
@@ -114,19 +114,7 @@ typedef struct redisReplyObjectFunctions {
void
(
*
freeObject
)(
void
*
);
}
redisReplyObjectFunctions
;
/* Context for a connection to Redis */
typedef
struct
redisContext
{
int
fd
;
int
flags
;
char
*
obuf
;
/* Write buffer */
int
err
;
/* Error flags, 0 when there is no error */
char
*
errstr
;
/* String representation of error when applicable */
/* Function set for reply buildup and reply reader */
redisReplyObjectFunctions
*
fn
;
void
*
reader
;
}
redisContext
;
/* State for the protocol parser */
typedef
struct
redisReader
{
int
err
;
/* Error flags, 0 when there is no error */
char
errstr
[
128
];
/* String representation of error when applicable */
...
...
@@ -158,6 +146,19 @@ int redisvFormatCommand(char **target, const char *format, va_list ap);
int
redisFormatCommand
(
char
**
target
,
const
char
*
format
,
...);
int
redisFormatCommandArgv
(
char
**
target
,
int
argc
,
const
char
**
argv
,
const
size_t
*
argvlen
);
/* Context for a connection to Redis */
typedef
struct
redisContext
{
int
fd
;
int
flags
;
char
*
obuf
;
/* Write buffer */
int
err
;
/* Error flags, 0 when there is no error */
char
*
errstr
;
/* String representation of error when applicable */
/* Function set for reply buildup and reply reader */
redisReplyObjectFunctions
*
fn
;
void
*
reader
;
}
redisContext
;
redisContext
*
redisConnect
(
const
char
*
ip
,
int
port
);
redisContext
*
redisConnectWithTimeout
(
const
char
*
ip
,
int
port
,
struct
timeval
tv
);
redisContext
*
redisConnectNonBlock
(
const
char
*
ip
,
int
port
);
...
...
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