Encoder class to generate Bencode on the fly (no buffer storage needed).
More...
#include <EmBencode.h>
|
| static void | push (const char *str) |
| | Push a string out in Bencode format. More...
|
| |
| static void | push (const void *ptr, uint8_t len) |
| | Push arbitrary bytes in Bencode format. More...
|
| |
| static void | push (long val) |
| | Push a signed integer in Bencode format. More...
|
| |
| static void | startList () |
| | Start a new new list. More...
|
| |
|
static void | endList () |
| | Terminate a list, started earlier with a call to startList().
|
| |
| static void | startDict () |
| | Start a new new dictionary. More...
|
| |
|
static void | endDict () |
| | Terminate a dictionary, started earlier with a call to startDict().
|
| |
|
|
static void | PushCount (uint32_t num) |
| |
|
static void | PushEnd () |
| |
|
static void | PushData (const void *ptr, uint8_t len) |
| |
| static void | PushChar (char ch) |
| | This function is not implemented in the library. More...
|
| |
Encoder class to generate Bencode on the fly (no buffer storage needed).
| static void EmBencode::push |
( |
const char * |
str | ) |
|
|
inlinestatic |
Push a string out in Bencode format.
- Parameters
-
| str | The zero-terminated string to send out (without trailing \0). |
| static void EmBencode::push |
( |
const void * |
ptr, |
|
|
uint8_t |
len |
|
) |
| |
|
inlinestatic |
Push arbitrary bytes in Bencode format.
- Parameters
-
| ptr | Pointer to the data to send out. |
| len | Number of data bytes to send out. |
| static void EmBencode::push |
( |
long |
val | ) |
|
|
inlinestatic |
Push a signed integer in Bencode format.
- Parameters
-
| val | The integer to send (this implementation supports 32 bits). |
| void EmBencode::PushChar |
( |
char |
ch | ) |
|
|
staticprotected |
This function is not implemented in the library.
It must be supplied by the caller to implement the actual writing of caharacters.
| static void EmBencode::startDict |
( |
| ) |
|
|
inlinestatic |
Start a new new dictionary.
Must be matched with a call to endDict(). Dictionary entries must consist of a string key plus an arbitrary value. Entries can be nested with more calls to startList(), startDict(), etc.
| static void EmBencode::startList |
( |
| ) |
|
|
inlinestatic |
The documentation for this class was generated from the following files:
- EmBencode.h
- examples/blinky/blinky.ino
- examples/serialSend/serialSend.ino