Documentation ¶ Index ¶ func New(size int) ([]byte, error) func Receive(ctx context.Context, wg *sync.WaitGroup, conn net.Conn, bufSize int) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func New ¶ func New(size int) ([]byte, error) New returns a byte slice of the given size and an error func Receive ¶ func Receive(ctx context.Context, wg *sync.WaitGroup, conn net.Conn, bufSize int) Receive starts reading from the specified connection. It takes a context (for cancellation) and waitgroup (clean shutdown). Buffer size used for reading is configurable. Upon returning it closes conn. Types ¶ This section is empty. Source Files ¶ View all Source files bytes.go Click to show internal directories. Click to hide internal directories.