34 #include <sys/types.h>
35 #include <sys/socket.h>
36 #include <netinet/in.h>
37 #include <arpa/inet.h>
51 dstr =
"Event: type=";
52 if (type == CONNECTION_ESTABLISHED)
53 dstr +=
"CONNECTION_ESTABLISHED";
54 else if (type == DISCONNECT)
56 else if (type == MESSAGE) {
58 dstr += (
String)
" version=" + (
int)header.version;
59 dstr += (
String)
" total_len=" + (
int)header.total_len;
60 dstr += (
String)
" header_len=" + (
int)header.header_len;
61 dstr += (
String)
" header_checksum=" + (
int)header.header_checksum;
62 dstr += (
String)
" flags=" + (
int)header.flags;
63 dstr += (
String)
" id=" + (
int)header.id;
64 dstr += (
String)
" gid=" + (
int)header.gid;
65 dstr += (
String)
" timeout_ms=" + (
int)header.timeout_ms;
66 dstr += (
String)
" payload_checksum=" + (
int)header.payload_checksum;
67 dstr += (
String)
" command=" + (
int)header.command;
69 else if (type == TIMER)
71 else if (type ==
ERROR)
81 dstr += addr.format();
std::string String
A String is simply a typedef to std::string.
Declarations for ReactorRunner.
const char * get_text(int error)
Returns a descriptive error message.
Compatibility Macros for C/C++.
String extensions and helpers: sets, maps, append operators etc.
Error codes, Exception handling, error logging.