Ship the WeChat hot-update catalogs and the camp, TideWhale T2, UI atlas, and animation-lab work.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
udx
2026-10-24 18:04:41 +08:00
co-authored by Cursor
parent 6ebc9401ce
commit 45e62132c8
1432 changed files with 2971856 additions and 2798 deletions
+9
View File
@@ -240,6 +240,15 @@ void ws_loop(socket_t s) {
buf.erase(buf.begin(), buf.begin() + static_cast<std::ptrdiff_t>(header + mask_len + payload_len));
if (opcode == 0x8) { // close
// Complete the peer's close handshake before closing the TCP socket.
std::vector<uint8_t> close_frame{0x88};
if (payload.size() <= 125 && payload.size() != 1) {
close_frame.push_back(static_cast<uint8_t>(payload.size()));
close_frame.insert(close_frame.end(), payload.begin(), payload.end());
} else {
close_frame.insert(close_frame.end(), {2, 0x03, 0xEA}); // 1002 protocol error
}
send_all(s, reinterpret_cast<const char*>(close_frame.data()), close_frame.size());
return;
}
if (opcode == 0x9) { // ping -> pong