code: func (cli *Client) receivePackets() {
  	defer func() {
  		// Close the channel which handles a signal which
  		// notifies the arrival of the CONNACK Packet.
  		close(cli.conn.connack)
  
  		cli.conn.wg.Done()
  	}()
  
  	for {
  		// Receive a Packet from the Server.
  		p, err := cli.receive()
  		if err != nil {
  			// Handle the error and disconnect
  			// the Network Connection.
  			cli.handleErrorAndDisconn(err)
  
  			// End the goroutine.
  			return
  		}
  
  		// Handle the Packet.
  		if err := cli.handlePacket(p); err != nil {
  			// Handle the error and disconnect
  			// the Network Connection.
  			cli.handleErrorAndDisconn(err)
  
  			// End the goroutine.
  			return
  		}
  	}
  }
docs: // receivePackets receives Packets from the Server.