code: func (a *Agent) Handle() {
  	defer func() {
  		a.Close()
  		logger.Log.Debugf("Session handle goroutine exit, SessionID=%d, UID=%d", a.Session.ID(), a.Session.UID())
  	}()
  
  	go a.write()
  	go a.heartbeat()
  	select {
  	case <-a.chDie: // agent closed signal
  		return
  	}
  }
docs: // Handle handles the messages from and to a client