Skip to content

Instantly share code, notes, and snippets.

View scaret's full-sized avatar
☠️

Derek Lu scaret

☠️
View GitHub Profile
@scaret
scaret / webap.js
Last active February 24, 2019 06:18
var res = new MyBuf(msg);
res.skip(2); // length
res.skip(2); // uri
res.skip(2); // server_type
res.skip(4); // flag
var code = parseInt(res.readUInt32LE()); // code
if (code > 0) { // error code
var exe_error_str = VOCS_CODE_MAP[code];
if (exe_error_str) {
return callback(exe_error_str);