Documentation ¶
Index ¶
Constants ¶
View Source
const BufferSize = 1024
BufferSize is the default buffer size for a set of IPv6 messages.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator interface { // Generate pushes the generation result `n` times to the given channel `ch`. // The given channel is not closed afterward, and may be used again. Generate(ctx context.Context, n int, ch chan<- []packet.Packet) }
Generator represents an IPv6 message generator.
type GeneratorOptions ¶
type GeneratorOptions struct { packet.Creator // Generator to use for generating destination addresses. Generator address.Generator // Randomize the pixel order. Randomize bool // Number of times to repeat frames when the file is animated. RepeatFrame int // Skip transparent pixels SkipTransparent bool // Interval on which to refresh the image. ReloadInterval time.Duration }
GeneratorOptions contains the options for initializing a Generator.
type Stream ¶
type Stream struct { // Size contains the number of pixels to iterate over. Size int // Gen contains a function that generates a single packet. Gen func(i int) packet.Packet }
Stream is a Generator that generates pixels based on a given function. Generated results are buffered in memory.
Click to show internal directories.
Click to hide internal directories.