Minnow Server Helper Functions.
|
U8 * | msCpAndInc (U8 *dest, int *dlen, const U8 *src, int slen) |
| Copies 'src' to 'dest'. More...
|
|
U8 * | msB64Encode (U8 *dest, int *dlen, const U8 *src, int slen) |
| Encodes 'src' as B64 and adds the string to 'dest'. More...
|
|
U8 * | msi2a (U8 *dest, int *dlen, U32 n) |
| Formats 'n' as a string and adds the string to 'dest'. More...
|
|
U8 * | msRespCT (U8 *dest, int *dlen, int contentLen, const U8 *extHeader) |
| Adds the following HTTP response to buffer 'dest'. More...
|
|
◆ msB64Encode()
U8 * msB64Encode |
( |
U8 * |
dest, |
|
|
int * |
dlen, |
|
|
const U8 * |
src, |
|
|
int |
slen |
|
) |
| |
Encodes 'src' as B64 and adds the string to 'dest'.
- Parameters
-
dest | the destination buffer |
dlen | destination buffer length |
src | (binary) buffer to B64 encode |
slen | 'src' length |
- Returns
- 'dest' pointer incremented by amount of data added
◆ msCpAndInc()
U8 * msCpAndInc |
( |
U8 * |
dest, |
|
|
int * |
dlen, |
|
|
const U8 * |
src, |
|
|
int |
slen |
|
) |
| |
Copies 'src' to 'dest'.
- Parameters
-
dest | the destination buffer |
dlen | destination buffer length |
src | buffer to copy |
slen | 'src' length |
- Returns
- 'dest' pointer incremented by amount of data added
◆ msi2a()
U8 * msi2a |
( |
U8 * |
dest, |
|
|
int * |
dlen, |
|
|
U32 |
n |
|
) |
| |
Formats 'n' as a string and adds the string to 'dest'.
- Parameters
-
dest | the destination buffer |
dlen | destination buffer length |
n | the number to format |
- Returns
- 'dest' pointer incremented by amount of data added
◆ msRespCT()
U8 * msRespCT |
( |
U8 * |
dest, |
|
|
int * |
dlen, |
|
|
int |
contentLen, |
|
|
const U8 * |
extHeader |
|
) |
| |
Adds the following HTTP response to buffer 'dest'.
HTTP/1.0 200 OK
Content-Length: ['contentLen' converted 2 string]
- Parameters
-
dest | the destination buffer |
dlen | destination buffer length |
contentLen | the size of the static HTML page |
extHeader | optional extra headers formatted as '\r\nkey:val' |
- Returns
- 'dest' pointer incremented by amount of data added