Skip to content

MeteorsLiu/tcpbatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TCP Batch Write

Why

Example

batch := tcpbatch.NewTCPBatch(TCPConn)

// replace
TCPConn.Write(buf1)
TCPConn.Write(buf2)
...
TCPConn.Write(bufn)

// to
batch.WriteBuffer(buf1)
batch.WriteBuffer(buf2)
batch.WriteBuffer(buf3)
...
batch.WriteBuffer(bufn)
// max size 1024
n, err := batch.Submit(nil)

About

TCP Batch Write

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages