code: def send(self, data):
          
          log.debug('Sending %s' % data)
          if not self._socket:
              log.warn('No connection')
              return
          self._socket.send_bytes(data.encode('utf-8'))
docs: Send data through websocket