Skip to content

Commit cac027c

Browse files
committed
more comments
1 parent ba95fc9 commit cac027c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

options.go

+4
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,31 @@ var defaultoptions = options{
1818
wtimeout: 30 * time.Second,
1919
}
2020

21+
// WithReadBuffer set read buffer size of connection
2122
func WithReadBuffer(sz int) Option {
2223
return func(opt options) options {
2324
opt.rbuf = sz
2425
return opt
2526
}
2627
}
2728

29+
// WithWriteBuffer set write buffer size of connection
2830
func WithWriteBuffer(sz int) Option {
2931
return func(opt options) options {
3032
opt.wbuf = sz
3133
return opt
3234
}
3335
}
3436

37+
// WithReadTimeout set read timeout of Conn.Recv
3538
func WithReadTimeout(t time.Duration) Option {
3639
return func(opt options) options {
3740
opt.rtimeout = t
3841
return opt
3942
}
4043
}
4144

45+
// WithWriteTimeout set write timeout of Conn.Send
4246
func WithWriteTimeout(t time.Duration) Option {
4347
return func(opt options) options {
4448
opt.wtimeout = t

reply.go

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ var replyPool = sync.Pool{
3535
},
3636
}
3737

38+
// NewReply creates Reply instance from pool
3839
func NewReply() *Reply {
3940
return replyPool.Get().(*Reply)
4041
}

0 commit comments

Comments
 (0)