Document the recommendations/restrictions around the buffer size (#81)

* Document the recommendations/restrictions around the buffer size
This commit is contained in:
Sebastian Zagrodzki
2020-04-29 21:51:05 +02:00
committed by GitHub
parent 9ad54830f4
commit e4c3f66a15
2 changed files with 18 additions and 1 deletions

View File

@@ -35,6 +35,9 @@ func (e *endpoint) newStream(size, count int) (*stream, error) {
// defines how many transactions should be active at any time.
// By keeping multiple transfers active at the same time, a Stream reduces
// the latency between subsequent transfers and increases reading throughput.
// Similarly to InEndpoint.Read, the size of the buffer should be a multiple
// of EndpointDesc.MaxPacketSize to avoid overflows, see documentation
// in InEndpoint.Read for more details.
func (e *InEndpoint) NewStream(size, count int) (*ReadStream, error) {
s, err := e.newStream(size, count)
if err != nil {