cyanray / LightWebSocketClient

A simple cross-platform WebSocket client, written in C++11.
MIT License
11 stars 2 forks source link

about vecotr variable in light_websocket_client.cpp #2

Open bigoceanan opened 1 year ago

bigoceanan commented 1 year ago

我看在light_websocket_client.cpp 使用了很多 std::vector的变量,最后是否要clear()和swap()啊

cyanray commented 1 year ago

你指的是 vector<byte_t> buffer;吗? 不需要的。每解析出一帧的内容,会调用 vector<byte_t>::earse(); 删掉这一帧的内容。