recv package:recv
Efficient network recv
Network recv based on buffer pools
Type for the receiving function with a buffer pool.
Type for the receiving function which receives N bytes.
This function returns a receiving function based on two receiving
functions. The returned function receives exactly N bytes. The first
argument is an initial received data. After consuming the initial
data, the two functions is used. When N is less than equal to 4096,
the buffer pool is used. Otherwise, a new buffer is allocated. In this
case, the global lock is taken.