43 const uint8_t *msg =
event->payload;
44 size_t remaining =
event->payload_len;
55 return String(
"NULL event");
57 const uint8_t *msg =
event->payload;
58 size_t remaining =
event->payload_len;
61 return event->to_str();
72 return String(str, len > 150 ? 150 : len);
83 cbuf->append_i32(error);
84 cbuf->append_str16(msg);
Network communication event.
static int32_t response_code(const Event *event)
Returns the response code from an event event generated in response to a request message.
std::string String
A String is simply a typedef to std::string.
static String string_format_message(const Event *event)
Returns error message decoded standard error MESSAGE generated in response to a request message...
String format(const char *fmt,...)
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this...
Po::typed_value< String > * str(String *v=0)
static CommBufPtr create_error_message(CommHeader &header, int error, const char *msg)
Creates a standard error message response.
uint32_t decode_i32(const uint8_t **bufp, size_t *remainp)
Decode a 32-bit integer in little-endian order.
size_t encoded_length_str16(const char *str)
Computes the encoded length of a string16 encoding.
const char * get_text(int error)
Returns a descriptive error message.
std::shared_ptr< CommBuf > CommBufPtr
Smart pointer to CommBuf.
Logging routines and macros.
Compatibility Macros for C/C++.
Functions to serialize/deserialize primitives to/from a memory buffer.
const char * decode_str16(const uint8_t **bufp, size_t *remainp)
Decodes a c-style string from the given buffer.
Declarations for CommBuf.
Declarations for Protocol.
Request/response message event.
This is a generic exception class for Hypertable.
Error codes, Exception handling, error logging.
int code() const
Returns the error code.