Skip to content

Commit

Permalink
Add Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lxzan committed Aug 15, 2024
1 parent 0a83d0c commit c96b189
Show file tree
Hide file tree
Showing 17 changed files with 413 additions and 3,127 deletions.
280 changes: 30 additions & 250 deletions client.go

Large diffs are not rendered by default.

427 changes: 37 additions & 390 deletions compress.go

Large diffs are not rendered by default.

203 changes: 39 additions & 164 deletions conn.go

Large diffs are not rendered by default.

16 changes: 3 additions & 13 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,7 @@ package gws
import "github.com/lxzan/gws/internal"

var (
// framePadding 用于填充帧头
// framePadding is used to pad the frame header
framePadding = frameHeader{}

// binaryPool 是一个缓冲池,用于管理二进制数据缓冲区
// binaryPool is a buffer pool used to manage binary data buffers
// 参数 128 表示缓冲区的初始大小,256*1024 表示缓冲区的最大大小
// The parameter 128 represents the initial size of the buffer, and 256*1024 represents the maximum size of the buffer
binaryPool = internal.NewBufferPool(128, 256*1024)

// defaultLogger 是默认的日志工具
// defaultLogger is the default logging tool
defaultLogger = new(stdLogger)
framePadding = frameHeader{} // 帧头填充物
binaryPool = internal.NewBufferPool(128, 256*1024) // 内存池
defaultLogger = new(stdLogger) // 默认日志工具
)
Loading

0 comments on commit c96b189

Please sign in to comment.