From 01b0aaed92c975e5e740c6202e7ff8e5a85085ce Mon Sep 17 00:00:00 2001 From: "fengyun.rui" Date: Thu, 7 Dec 2023 13:01:23 +0800 Subject: [PATCH] fix: add comment for the readBufferSize and writeBufferSize (#869) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### summary 😅 Every time I use `gorilla/websocket`, I need to look at the source code and find the default size for readBufferSize and writeBufferSize. I think the default value should be written in the comment. Signed-off-by: rfyiamcool Co-authored-by: Alex Vulaj --- server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server.go b/server.go index 29d0deb..d8a205e 100644 --- a/server.go +++ b/server.go @@ -34,6 +34,7 @@ type Upgrader struct { // size is zero, then buffers allocated by the HTTP server are used. The // I/O buffer sizes do not limit the size of the messages that can be sent // or received. + // The default value is 4096 bytes, 4kb. ReadBufferSize, WriteBufferSize int // WriteBufferPool is a pool of buffers for write operations. If the value