Emscripten Using libC Socket, Assertion failed: undefined -
i have problem example called "test_sockets_partial_client.c". expect read data server working, browser connect server, send data server, when server response console returns: assertion failed: undefined.
non-emscripten version of client written in pure javascript websocket class, works great.
someone have idea ?
btw. server in c#, send client,
byte[] send = new byte[5 + 2]; send[0] = 0x81; // last frame, text send[1] = 5; // not masked, length 5 send[2] = (byte)'x'; send[3] = (byte)'y'; send[4] = (byte)'z'; send[5] = (byte)'a'; send[6] = (byte)'b'; client.send(send);
problem data type, raw sockets created through emscripten must binary. 0x81 text data, 0x82 binary data.
send[0] = 0x82; // last frame, binary
Comments
Post a Comment