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