Documentation
¶
Overview ¶
Package mechpixel dispenses drawings of scenes associated with a particular shutterbug.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPixelHandleFunc ¶
func NewPixelHandleFunc( d Dispenser, shutterbugs mechshutterbug.Containser, ) http.HandlerFunc
NewPixelHandleFunc creates a HTTP request handler which allows clients to interface with the dispenser.
The handler upgrades the HTTP request to a websocket. The websocket's first ever incoming message should be a valid shutterbug.
Types ¶
type Dispenser ¶
A Dispenser of pixels.
func NewDispenser ¶
NewDispenser constructs a new Dispenser.
func (Dispenser) Dispense ¶
func (d Dispenser) Dispense(shutterbug string, pix wiregl.BinaryPixelData)
Dispense the given pixels to the viewers of the shutterbug.
func (Dispenser) RemoveShutterbug ¶
RemoveShutterbug from the dispenser and close the associated HTTP request handlers using that shutterbug.
Click to show internal directories.
Click to hide internal directories.