code: func (m *Memberlist) packetHandler() {
  	for {
  		select {
  		case <-m.handoffCh:
  			for {
  				msg, ok := m.getNextMessage()
  				if !ok {
  					break
  				}
  				msgType := msg.msgType
  				buf := msg.buf
  				from := msg.from
  
  				switch msgType {
  				case suspectMsg:
  					m.handleSuspect(buf, from)
  				case aliveMsg:
  					m.handleAlive(buf, from)
  				case deadMsg:
  					m.handleDead(buf, from)
  				case userMsg:
  					m.handleUser(buf, from)
  				default:
  					m.logger.Printf("[ERR] memberlist: Message type (%d) not supported %s (packet handler)", msgType, LogAddress(from))
  				}
  			}
  
  		case <-m.shutdownCh:
  			return
  		}
  	}
  }
docs: // packetHandler is a long running goroutine that processes messages received
  // over the packet interface, but is decoupled from the listener to avoid
  // blocking the listener which may cause ping/ack messages to be delayed.