BSD Ports

net/hs-recv 0.1.0nb5 NetBSD

Efficient network recv

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
modified-bsd
Categories
net
Package size
67.4 KiB, 375.2 KiB installed

Description

This module provides efficient receiving functions from the network. recv uses createAndTrim which behaves as follows:

* Allocates a buffer whose size is decided from the first argument. * Receives data with the buffer. * Allocates another buffer whose size fits the received data. * Copies the data from the first buffer to the second buffer.

On 64bit machines, the global lock is taken for the allocation of a byte string whose length is larger than or equal to 3272 bytes. So, for instance, if 4,096 is specified to recv and the size of received data is 3,300, the global lock is taken twice with the copy overhead.

The efficient receiving functions provided here use a buffer pool. A large buffer is allocated at the beginning and it is divided into a used one and a leftover when receiving. The latter is kept in the buffer pooll and will be used next time. When the buffer gets small and usefless, a new large buffer is allocated.

Install

Binary package:

pkgin install hs-recv

From pkgsrc:

cd /usr/pkgsrc/net/hs-recv && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_640.1.0nb5
NetBSD 10.1 aarch640.1.0nb5
SmartOS / illumos x86_640.1.0nb5
macOS 15 arm640.1.0nb5

Dependencies

Run dependencies 2