my hg working dir managed to break itself somehow... my attempt to fix that, and add some cache code :)
#include <sys/types.h>
#define RENDER_PORT 6159
#define RENDER_PORT_NAME "6159"
#pragma pack(push)
#pragma pack(1)
struct render_cmd {
u_int8_t mode;
u_int32_t img_w;
u_int32_t img_h;
double x1;
double y1;
double x2;
double y2;
};
#pragma pack(pop)