bibliopixel.drivers.SimPixel.websocket module

class bibliopixel.drivers.SimPixel.websocket.Client(*args, server)[source]

Bases: bibliopixel.drivers.SimPixel.SimpleWebSocketServer.WebSocket

PIXEL_START = bytearray(b'\x00\x01')
POSITION_START = bytearray(b'\x00\x00')
handleClose()[source]

Called when a websocket server gets a Close frame from a client.

handleConnected()[source]

Called when a websocket client connects to the server.

handleMessage()[source]

Called when websocket frame is received. To access the frame data call self.data.

If the frame is Text then self.data is a unicode object. If the frame is Binary then self.data is a bytearray object.

update(pixels=None, positions=None)[source]
class bibliopixel.drivers.SimPixel.websocket.Server(port, selectInterval)[source]

Bases: object

add_client(client)[source]
close()[source]
is_alive()[source]
remove_client(client)[source]
stop()[source]
target()[source]
update(**state)[source]