code: func (c *Client) sendHub() {
  	defer c.wg.Done()
  
  	for {
  		select {
  		case msg := <-c.send:
  			c.LocalKite.Log.Debug("sending: %s", msg)
  			session := c.getSession()
  			if session == nil {
  				c.LocalKite.Log.Error("not connected")
  				continue
  			}
  
  			err := session.Send(string(msg.p))
  			if err != nil {
  				if msg.errC != nil {
  					msg.errC <- err
  				}
  
  				if sockjsclient.IsSessionClosed(err) {
  					// The readloop may already be interrupted, thus the non-blocking send.
  					select {
  					case c.interrupt <- err:
  					default:
  					}
  
  					c.LocalKite.Log.Error("error sending to %s: %s", session.ID(), err)
  					return
  				}
  			}
  		case <-c.closeChan:
  			c.LocalKite.Log.Debug("Send hub is closed")
  			return
  		}
  	}
  }
docs: // sendhub sends the msg received from the send channel to the remote client