static int SendFunction(void * ctx, const uint8_t * data, size_t size) { MSocket * ws = (MSocket*)ctx; int res = ws->send(data, size); return res; }