Blink DB Documentation v1.0.0
Blink DB Documentation
Loading...
Searching...
No Matches
RespDecoder Class Reference

RESP Decoder class. More...

#include <resp_decoder.hpp>

Static Public Member Functions

static Resp decode (const char *buffer, size_t length)
 Decode a RESP command from a buffer.
static Resp decode (const char *buffer)
 Decode a RESP command from a null-terminated string.

Detailed Description

RESP Decoder class.

This class is responsible for decoding RESP commands from a buffer. It parses the input buffer to extract the operation, key, and value, and handles error cases. The decode method returns a Resp object containing the parsed information.

Member Function Documentation

◆ decode() [1/2]

Resp RespDecoder::decode ( const char * buffer)
inlinestatic

Decode a RESP command from a null-terminated string.

Parameters
bufferThe input buffer containing the RESP command
Returns
Resp object containing the parsed information

◆ decode() [2/2]

Resp RespDecoder::decode ( const char * buffer,
size_t length )
inlinestatic

Decode a RESP command from a buffer.

Parameters
bufferThe input buffer containing the RESP command
lengthThe length of the input buffer
Returns
Resp object containing the parsed information

The documentation for this class was generated from the following file: