 class Server
   buffer: []
   ws: undefined
+  timer: undefined
 
   constructor: (@host, @port, @options = {}) ->
 

      # make an initial call to our recursive _write_pipe() method
      @_write_pipe()

    socket.on 'connect_error', (obj) => console.log 'connect error', obj
    socket.on 'disconnect',          => console.log "socket at #{@_url()} disconnected"
    socket.on 'colorChanged', (data) => @_to_buffer(data)
    socket.on 'colorSet',     (data) => @_to_buffer(data)

  #
  # create writestream to kernel at /dev/ttyO1

  # if buffer has content, at 30ms resolution. recursively call this function on success
  #
  _write_pipe: ->
    @timer = setTimeout (=>
      # clear @timer (memory leak!)
      clearTimeout(@timer)

      # recurse
      if @buffer.length == 0
