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 <rfyiamcool@163.com>
Co-authored-by: Alex Vulaj <ajvulaj@gmail.com>
This commit is contained in:
fengyun.rui 2023-12-07 13:01:23 +08:00 committed by GitHub
parent 286c896192
commit 01b0aaed92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -34,6 +34,7 @@ type Upgrader struct {
// size is zero, then buffers allocated by the HTTP server are used. The // 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 // I/O buffer sizes do not limit the size of the messages that can be sent
// or received. // or received.
// The default value is 4096 bytes, 4kb.
ReadBufferSize, WriteBufferSize int ReadBufferSize, WriteBufferSize int
// WriteBufferPool is a pool of buffers for write operations. If the value // WriteBufferPool is a pool of buffers for write operations. If the value