Skip to content

Commit

Permalink
测试通过
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Sep 3, 2024
1 parent 222331f commit 28868cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ws/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import (
"net/http"
)

// Client websocket 客户端
type Client struct {
config *websocket.Config // 客户端配置
conn *websocket.Conn // 客户端连接
msgBufferSize int // 接收消息时的缓冲区大小
}

// NewClient 实例化对象
func NewClient(addr string, msgBufferSize int) (*Client, error) {
config, err := websocket.NewConfig(addr, addr)
config.Header = make(http.Header)
Expand Down

0 comments on commit 28868cf

Please sign in to comment.