add parameter ReadBufferSize to set the read buffer size

This commit is contained in:
aler9
2021-02-18 22:59:07 +01:00
parent 6ce21a7841
commit 557fadcd3c
7 changed files with 31 additions and 20 deletions

View File

@@ -22,6 +22,9 @@ func newServer(conf ServerConf, address string) (*Server, error) {
if conf.ReadBufferCount == 0 {
conf.ReadBufferCount = 512
}
if conf.ReadBufferSize == 0 {
conf.ReadBufferSize = 2048
}
if conf.Listen == nil {
conf.Listen = net.Listen
}