Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
fcafaa73
Commit
fcafaa73
authored
Feb 12, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style fixes in the comments
parent
079b9ec2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
mongoose.h
mongoose.h
+9
-7
No files found.
mongoose.h
View file @
fcafaa73
...
@@ -148,10 +148,11 @@ struct mg_request_info *mg_get_request_info(struct mg_connection *);
...
@@ -148,10 +148,11 @@ struct mg_request_info *mg_get_request_info(struct mg_connection *);
// Return:
// Return:
// 0 when the connection has been closed
// 0 when the connection has been closed
// -1 on error
// -1 on error
// number of bytes written on success
//
>0
number of bytes written on success
int
mg_write
(
struct
mg_connection
*
,
const
void
*
buf
,
size_t
len
);
int
mg_write
(
struct
mg_connection
*
,
const
void
*
buf
,
size_t
len
);
// Macros for enabling compiler-specific checks for printf-like arguments.
#undef PRINTF_FORMAT_STRING
#undef PRINTF_FORMAT_STRING
#if _MSC_VER >= 1400
#if _MSC_VER >= 1400
#include <sal.h>
#include <sal.h>
...
@@ -170,11 +171,9 @@ int mg_write(struct mg_connection *, const void *buf, size_t len);
...
@@ -170,11 +171,9 @@ int mg_write(struct mg_connection *, const void *buf, size_t len);
#define PRINTF_ARGS(x, y)
#define PRINTF_ARGS(x, y)
#endif
#endif
// Send data to the
browser
using printf() semantics.
// Send data to the
client
using printf() semantics.
//
//
// Works exactly like mg_write(), but allows to do message formatting.
// Works exactly like mg_write(), but allows to do message formatting.
// Below are the macros for enabling compiler-specific checks for
// printf-like arguments.
int
mg_printf
(
struct
mg_connection
*
,
int
mg_printf
(
struct
mg_connection
*
,
PRINTF_FORMAT_STRING
(
const
char
*
fmt
),
...)
PRINTF_ARGS
(
2
,
3
);
PRINTF_FORMAT_STRING
(
const
char
*
fmt
),
...)
PRINTF_ARGS
(
2
,
3
);
...
@@ -209,7 +208,8 @@ const char *mg_get_header(const struct mg_connection *, const char *name);
...
@@ -209,7 +208,8 @@ const char *mg_get_header(const struct mg_connection *, const char *name);
// On success, length of the decoded variable.
// On success, length of the decoded variable.
// On error:
// On error:
// -1 (variable not found).
// -1 (variable not found).
// -2 (destination buffer is NULL, zero length or too small to hold the decoded variable).
// -2 (destination buffer is NULL, zero length or too small to hold the
// decoded variable).
//
//
// Destination buffer is guaranteed to be '\0' - terminated if it is not
// Destination buffer is guaranteed to be '\0' - terminated if it is not
// NULL or zero length.
// NULL or zero length.
...
@@ -225,8 +225,10 @@ int mg_get_var(const char *data, size_t data_len,
...
@@ -225,8 +225,10 @@ int mg_get_var(const char *data, size_t data_len,
// Return:
// Return:
// On success, value length.
// On success, value length.
// On error:
// On error:
// -1 (either "Cookie:" header is not present at all or the requested parameter is not found).
// -1 (either "Cookie:" header is not present at all or the requested
// -2 (destination buffer is NULL, zero length or too small to hold the value).
// parameter is not found).
// -2 (destination buffer is NULL, zero length or too small to hold the
// value).
int
mg_get_cookie
(
const
struct
mg_connection
*
,
int
mg_get_cookie
(
const
struct
mg_connection
*
,
const
char
*
cookie_name
,
char
*
buf
,
size_t
buf_len
);
const
char
*
cookie_name
,
char
*
buf
,
size_t
buf_len
);
...
...
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