code: func (c *ChromeTarget) listenWrite() {
  	for {
  		select {
  		// send message to the browser debugger client
  		case msg := <-c.sendCh:
  			c.replyLock.Lock()
  			c.replyDispatcher[msg.Id] = msg.ReplyCh
  			c.replyLock.Unlock()
  
  			c.debugf("%d sending to chrome. %s\n", msg.Id, msg.Data)
  
  			err := websocket.Message.Send(c.conn, string(msg.Data))
  			if err != nil {
  				c.debugf("error sending message: %s\n", err)
  				return
  			}
  		// receive done from listenRead
  		case <-c.doneCh:
  			return
  		}
  	}
  }
docs: // Listens for API components wishing to send requests to the Chrome Debugger Service