Skip to content

Commit

Permalink
fix: add comment for the readBufferSize and writeBufferSize (#869)
Browse files Browse the repository at this point in the history
### 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]>
  • Loading branch information
rfyiamcool and AlexVulaj authored Dec 7, 2023
1 parent 286c896 commit 01b0aae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01b0aae

Please sign in to comment.