Skip to content

Commit 4963ce9

Browse files
committed
Replace entire AsyncWebSocketBuffer infrastructure with std::shared_ptr
Based on commit 9172736 of dumbfixes branch of 0xFEEDC0DE64 fork of ESPAsyncWebServer. The entire purpose of having an AsyncWebSocketMessageBuffer is to maintain a shared copy of a buffer sent to multiple clients until all of them finish sending it. This can be replaced with a single message object that contains a shared_ptr to the data being sent. For the single client case, this is equivalent to non-shared buffer. For multiple clients, the shared_ptr will maintain the buffer live until all messages referencing it are destroyed. This simplifies the websocket architecture.
1 parent 04672f4 commit 4963ce9

File tree

2 files changed

+368
-698
lines changed

2 files changed

+368
-698
lines changed

0 commit comments

Comments
 (0)