Skip to content

Commit 01b0aae

Browse files
fix: add comment for the readBufferSize and writeBufferSize (#869)
### 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 <[email protected]> Co-authored-by: Alex Vulaj <[email protected]>
1 parent 286c896 commit 01b0aae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

server.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type Upgrader struct {
3434
// size is zero, then buffers allocated by the HTTP server are used. The
3535
// I/O buffer sizes do not limit the size of the messages that can be sent
3636
// or received.
37+
// The default value is 4096 bytes, 4kb.
3738
ReadBufferSize, WriteBufferSize int
3839

3940
// WriteBufferPool is a pool of buffers for write operations. If the value

0 commit comments

Comments
 (0)